LLVM 19.0.0git
Public Member Functions | Public Attributes | List of all members
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.

◆ Variant() [3/13]

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

Definition at line 415 of file PDBTypes.h.

◆ Variant() [4/13]

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

Definition at line 416 of file PDBTypes.h.

◆ Variant() [5/13]

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

Definition at line 419 of file PDBTypes.h.

◆ Variant() [6/13]

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

Definition at line 422 of file PDBTypes.h.

◆ Variant() [7/13]

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

Definition at line 425 of file PDBTypes.h.

◆ Variant() [8/13]

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

Definition at line 428 of file PDBTypes.h.

◆ Variant() [9/13]

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

Definition at line 431 of file PDBTypes.h.

◆ Variant() [10/13]

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

Definition at line 434 of file PDBTypes.h.

◆ Variant() [11/13]

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

Definition at line 437 of file PDBTypes.h.

◆ Variant() [12/13]

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

Definition at line 440 of file PDBTypes.h.

◆ Variant() [13/13]

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

Definition at line 444 of file PDBTypes.h.

References llvm::Other.

◆ ~Variant()

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

Definition at line 448 of file PDBTypes.h.

References llvm::pdb::String.

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, 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, UInt16, UInt32, UInt64, and UInt8.

◆ operator!=()

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

Definition at line 578 of file PDBTypes.h.

References llvm::Other.

◆ operator=()

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

Definition at line 579 of file PDBTypes.h.

References llvm::Other, and llvm::pdb::String.

◆ operator==()

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

Definition at line 555 of file PDBTypes.h.

References Bool, Double, Int16, Int32, Int64, Int8, llvm::Other, Single, String, UInt16, UInt32, UInt64, UInt8, and VARIANT_EQUAL_CASE.

◆ toAPFloat()

APFloat llvm::pdb::Variant::toAPFloat ( ) const
inline

◆ toAPSInt()

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

Definition at line 515 of file PDBTypes.h.

References assert(), Bool, Int16, Int32, Int64, Int8, 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==(), and toAPSInt().

◆ Double

double llvm::pdb::Variant::Double

Definition at line 461 of file PDBTypes.h.

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

◆ Int16

int16_t llvm::pdb::Variant::Int16

Definition at line 457 of file PDBTypes.h.

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

◆ Int32

int32_t llvm::pdb::Variant::Int32

Definition at line 458 of file PDBTypes.h.

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

◆ Int64

int64_t llvm::pdb::Variant::Int64

Definition at line 459 of file PDBTypes.h.

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

◆ Int8

int8_t llvm::pdb::Variant::Int8

Definition at line 456 of file PDBTypes.h.

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

◆ Single

float llvm::pdb::Variant::Single

Definition at line 460 of file PDBTypes.h.

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

◆ String

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

Definition at line 466 of file PDBTypes.h.

Referenced by operator==().

◆ Type

PDB_VariantType llvm::pdb::Variant::Type = PDB_VariantType::Empty

Definition at line 453 of file PDBTypes.h.

◆ UInt16

uint16_t llvm::pdb::Variant::UInt16

Definition at line 463 of file PDBTypes.h.

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

◆ UInt32

uint32_t llvm::pdb::Variant::UInt32

Definition at line 464 of file PDBTypes.h.

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

◆ UInt64

uint64_t llvm::pdb::Variant::UInt64

Definition at line 465 of file PDBTypes.h.

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

◆ UInt8

uint8_t llvm::pdb::Variant::UInt8

Definition at line 462 of file PDBTypes.h.

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

◆ 

union { ... } llvm::pdb::Variant::Value

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