LLVM 22.0.0git
llvm::pdb::Variant Struct Reference

#include "llvm/DebugInfo/PDB/PDBTypes.h"

Public Member Functions

 Variant ()=default
 Variant (bool V)
 Variant (int8_t V)
 Variant (int16_t V)
 Variant (int32_t V)
 Variant (int64_t V)
 Variant (float V)
 Variant (double V)
 Variant (uint8_t V)
 Variant (uint16_t V)
 Variant (uint32_t V)
 Variant (uint64_t V)
 Variant (const Variant &Other)
 ~Variant ()
bool isIntegralType () const
unsigned getBitWidth () const
APSInt toAPSInt () const
APFloat toAPFloat () const
bool operator== (const Variant &Other) const
bool operator!= (const Variant &Other) const
Variantoperator= (const Variant &Other)

Public Attributes

PDB_VariantType Type = PDB_VariantType::Empty
union { 
   bool   Bool 
   int8_t   Int8 
   int16_t   Int16 
   int32_t   Int32 
   int64_t   Int64 
   float   Single 
   double   Double 
   uint8_t   UInt8 
   uint16_t   UInt16 
   uint32_t   UInt32 
   uint64_t   UInt64 
   char *   String 
Value

Detailed Description

Definition at line 411 of file PDBTypes.h.

Constructor & Destructor Documentation

◆ Variant() [1/13]

llvm::pdb::Variant::Variant ( )
default

◆ Variant() [2/13]

llvm::pdb::Variant::Variant ( bool V)
inlineexplicit

Definition at line 414 of file PDBTypes.h.

References Bool, Type, and Value.

◆ Variant() [3/13]

llvm::pdb::Variant::Variant ( int8_t V)
inlineexplicit

Definition at line 415 of file PDBTypes.h.

References Int8, Type, and Value.

◆ Variant() [4/13]

llvm::pdb::Variant::Variant ( int16_t V)
inlineexplicit

Definition at line 416 of file PDBTypes.h.

References Int16, Type, and Value.

◆ Variant() [5/13]

llvm::pdb::Variant::Variant ( int32_t V)
inlineexplicit

Definition at line 419 of file PDBTypes.h.

References Int32, Type, and Value.

◆ Variant() [6/13]

llvm::pdb::Variant::Variant ( int64_t V)
inlineexplicit

Definition at line 422 of file PDBTypes.h.

References Int64, Type, and Value.

◆ Variant() [7/13]

llvm::pdb::Variant::Variant ( float V)
inlineexplicit

Definition at line 425 of file PDBTypes.h.

References Single, Type, and Value.

◆ Variant() [8/13]

llvm::pdb::Variant::Variant ( double V)
inlineexplicit

Definition at line 428 of file PDBTypes.h.

References Double, Type, and Value.

◆ Variant() [9/13]

llvm::pdb::Variant::Variant ( uint8_t V)
inlineexplicit

Definition at line 431 of file PDBTypes.h.

References Type, UInt8, and Value.

◆ Variant() [10/13]

llvm::pdb::Variant::Variant ( uint16_t V)
inlineexplicit

Definition at line 434 of file PDBTypes.h.

References Type, UInt16, and Value.

◆ Variant() [11/13]

llvm::pdb::Variant::Variant ( uint32_t V)
inlineexplicit

Definition at line 437 of file PDBTypes.h.

References Type, UInt32, and Value.

◆ Variant() [12/13]

llvm::pdb::Variant::Variant ( uint64_t V)
inlineexplicit

Definition at line 440 of file PDBTypes.h.

References Type, UInt64, and Value.

◆ Variant() [13/13]

llvm::pdb::Variant::Variant ( const Variant & Other)
inline

Definition at line 444 of file PDBTypes.h.

References llvm::Other, and Variant().

◆ ~Variant()

llvm::pdb::Variant::~Variant ( )
inline

Definition at line 448 of file PDBTypes.h.

References llvm::pdb::String, Type, and Value.

Member Function Documentation

◆ getBitWidth()

unsigned llvm::pdb::Variant::getBitWidth ( ) const
inline

Definition at line 490 of file PDBTypes.h.

References assert(), Bool, Double, Int16, Int32, Int64, Int8, Single, Type, UInt16, UInt32, UInt64, UInt8, and VARIANT_WIDTH.

◆ isIntegralType()

bool llvm::pdb::Variant::isIntegralType ( ) const
inline

Definition at line 469 of file PDBTypes.h.

References Bool, Int16, Int32, Int64, Int8, Type, UInt16, UInt32, UInt64, and UInt8.

◆ operator!=()

bool llvm::pdb::Variant::operator!= ( const Variant & Other) const
inline

Definition at line 580 of file PDBTypes.h.

References llvm::Other, and Variant().

◆ operator=()

Variant & llvm::pdb::Variant::operator= ( const Variant & Other)
inline

Definition at line 581 of file PDBTypes.h.

References llvm::Other, llvm::pdb::String, Type, Value, and Variant().

◆ operator==()

bool llvm::pdb::Variant::operator== ( const Variant & Other) const
inline

◆ toAPFloat()

◆ toAPSInt()

APSInt llvm::pdb::Variant::toAPSInt ( ) const
inline

Definition at line 517 of file PDBTypes.h.

References assert(), Bool, Int16, Int32, Int64, Int8, Type, UInt16, UInt32, UInt64, UInt8, and VARIANT_APSINT.

Member Data Documentation

◆ Bool

bool llvm::pdb::Variant::Bool

Definition at line 455 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ Double

double llvm::pdb::Variant::Double

Definition at line 461 of file PDBTypes.h.

Referenced by getBitWidth(), operator==(), and Variant().

◆ Int16

int16_t llvm::pdb::Variant::Int16

Definition at line 457 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ Int32

int32_t llvm::pdb::Variant::Int32

Definition at line 458 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ Int64

int64_t llvm::pdb::Variant::Int64

Definition at line 459 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ Int8

int8_t llvm::pdb::Variant::Int8

Definition at line 456 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ Single

float llvm::pdb::Variant::Single

Definition at line 460 of file PDBTypes.h.

Referenced by getBitWidth(), operator==(), and Variant().

◆ String

char* llvm::pdb::Variant::String

Definition at line 466 of file PDBTypes.h.

Referenced by operator==().

◆ Type

◆ UInt16

uint16_t llvm::pdb::Variant::UInt16

Definition at line 463 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ UInt32

uint32_t llvm::pdb::Variant::UInt32

Definition at line 464 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ UInt64

uint64_t llvm::pdb::Variant::UInt64

Definition at line 465 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ UInt8

uint8_t llvm::pdb::Variant::UInt8

Definition at line 462 of file PDBTypes.h.

Referenced by getBitWidth(), isIntegralType(), operator==(), toAPSInt(), and Variant().

◆ [union]


The documentation for this struct was generated from the following file: