LLVM  6.0.0svn
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
llvm::pdb::PDBSymbol Class Referenceabstract

PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e.g. More...

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

Inheritance diagram for llvm::pdb::PDBSymbol:
Inheritance graph
[legend]
Collaboration diagram for llvm::pdb::PDBSymbol:
Collaboration graph
[legend]

Public Member Functions

virtual ~PDBSymbol ()
 
virtual void dump (PDBSymDumper &Dumper) const =0
 Dumps the contents of a symbol a raw_ostream. More...
 
virtual void dumpRight (PDBSymDumper &Dumper) const
 For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right side of the symbol. More...
 
void defaultDump (raw_ostream &OS, int Indent) const
 
void dumpProperties () const
 
void dumpChildStats () const
 
PDB_SymType getSymTag () const
 
uint32_t getSymIndexId () const
 
template<typename T >
std::unique_ptr< TfindOneChild () const
 
std::unique_ptr< PDBSymbolclone () const
 
template<typename T >
std::unique_ptr< ConcreteSymbolEnumerator< T > > findAllChildren () const
 
std::unique_ptr< IPDBEnumSymbolsfindAllChildren (PDB_SymType Type) const
 
std::unique_ptr< IPDBEnumSymbolsfindAllChildren () const
 
std::unique_ptr< IPDBEnumSymbolsfindChildren (PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags) const
 
std::unique_ptr< IPDBEnumSymbolsfindChildrenByRVA (PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const
 
std::unique_ptr< IPDBEnumSymbolsfindInlineFramesByRVA (uint32_t RVA) const
 
const IPDBRawSymbolgetRawSymbol () const
 
IPDBRawSymbolgetRawSymbol ()
 
const IPDBSessiongetSession () const
 
std::unique_ptr< IPDBEnumSymbolsgetChildStats (TagStats &Stats) const
 

Static Public Member Functions

static std::unique_ptr< PDBSymbolcreate (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > Symbol)
 

Protected Member Functions

 PDBSymbol (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > Symbol)
 
 PDBSymbol (PDBSymbol &Symbol)
 
std::unique_ptr< PDBSymbolgetSymbolByIdHelper (uint32_t Id) const
 
template<typename ConcreteType >
std::unique_ptr< ConcreteType > getConcreteSymbolByIdHelper (uint32_t Id) const
 

Protected Attributes

const IPDBSessionSession
 
std::unique_ptr< IPDBRawSymbolRawSymbol
 

Detailed Description

PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e.g.

functions, executables, vtables, etc). All concrete symbol types inherit from PDBSymbol and expose the exact set of methods that are valid for that particular symbol type, as described in the Microsoft reference "Lexical and Class Hierarchy of Symbol Types": https://msdn.microsoft.com/en-us/library/370hs6k4.aspx

Definition at line 61 of file PDBSymbol.h.

Constructor & Destructor Documentation

◆ PDBSymbol() [1/2]

PDBSymbol::PDBSymbol ( const IPDBSession PDBSession,
std::unique_ptr< IPDBRawSymbol Symbol 
)
protected

Definition at line 53 of file PDBSymbol.cpp.

◆ PDBSymbol() [2/2]

PDBSymbol::PDBSymbol ( PDBSymbol Symbol)
protected

Definition at line 57 of file PDBSymbol.cpp.

References ~PDBSymbol().

◆ ~PDBSymbol()

PDBSymbol::~PDBSymbol ( )
virtualdefault

Referenced by PDBSymbol().

Member Function Documentation

◆ clone()

std::unique_ptr< PDBSymbol > PDBSymbol::clone ( ) const

Definition at line 126 of file PDBSymbol.cpp.

References llvm::pdb::IPDBSession::getSymbolById(), getSymIndexId(), and Session.

Referenced by findOneChild().

◆ create()

std::unique_ptr< PDBSymbol > PDBSymbol::create ( const IPDBSession PDBSession,
std::unique_ptr< IPDBRawSymbol Symbol 
)
static

◆ defaultDump()

void PDBSymbol::defaultDump ( raw_ostream OS,
int  Indent 
) const

Definition at line 106 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by dumpProperties(), and dumpRight().

◆ dump()

virtual void llvm::pdb::PDBSymbol::dump ( PDBSymDumper Dumper) const
pure virtual

◆ dumpChildStats()

void PDBSymbol::dumpChildStats ( ) const

Definition at line 116 of file PDBSymbol.cpp.

References llvm::raw_ostream::flush(), getChildStats(), llvm::outs(), and Stats.

Referenced by dumpRight().

◆ dumpProperties()

void PDBSymbol::dumpProperties ( ) const

Definition at line 110 of file PDBSymbol.cpp.

References defaultDump(), llvm::raw_ostream::flush(), and llvm::outs().

Referenced by dumpRight().

◆ dumpRight()

virtual void llvm::pdb::PDBSymbol::dumpRight ( PDBSymDumper Dumper) const
inlinevirtual

For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right side of the symbol.

Reimplemented in llvm::pdb::PDBSymbolTypeFunctionSig, llvm::pdb::PDBSymbolTypeArray, and llvm::pdb::PDBSymbolTypePointer.

Definition at line 81 of file PDBSymbol.h.

References defaultDump(), dumpChildStats(), dumpProperties(), getSymIndexId(), and getSymTag().

◆ findAllChildren() [1/3]

template<typename T >
std::unique_ptr<ConcreteSymbolEnumerator<T> > llvm::pdb::PDBSymbol::findAllChildren ( ) const
inline

◆ findAllChildren() [2/3]

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren ( PDB_SymType  Type) const

Definition at line 138 of file PDBSymbol.cpp.

References RawSymbol.

◆ findAllChildren() [3/3]

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findAllChildren ( ) const

Definition at line 133 of file PDBSymbol.cpp.

References findAllChildren(), and llvm::pdb::None.

◆ findChildren()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildren ( PDB_SymType  Type,
StringRef  Name,
PDB_NameSearchFlags  Flags 
) const

Definition at line 143 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by findAllChildren().

◆ findChildrenByRVA()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findChildrenByRVA ( PDB_SymType  Type,
StringRef  Name,
PDB_NameSearchFlags  Flags,
uint32_t  RVA 
) const

Definition at line 149 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by findAllChildren().

◆ findInlineFramesByRVA()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::findInlineFramesByRVA ( uint32_t  RVA) const

Definition at line 155 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by findAllChildren().

◆ findOneChild()

template<typename T >
std::unique_ptr<T> llvm::pdb::PDBSymbol::findOneChild ( ) const
inline

Definition at line 90 of file PDBSymbol.h.

References clone(), and llvm::dwarf::syntax::Enumerator.

◆ getChildStats()

std::unique_ptr< IPDBEnumSymbols > PDBSymbol::getChildStats ( TagStats Stats) const

Definition at line 160 of file PDBSymbol.cpp.

References findAllChildren().

Referenced by dumpChildStats(), and getSession().

◆ getConcreteSymbolByIdHelper()

template<typename ConcreteType >
std::unique_ptr<ConcreteType> llvm::pdb::PDBSymbol::getConcreteSymbolByIdHelper ( uint32_t  Id) const
inlineprotected

Definition at line 129 of file PDBSymbol.h.

References getSymbolByIdHelper().

◆ getRawSymbol() [1/2]

const IPDBRawSymbol& llvm::pdb::PDBSymbol::getRawSymbol ( ) const
inline

◆ getRawSymbol() [2/2]

IPDBRawSymbol& llvm::pdb::PDBSymbol::getRawSymbol ( )
inline

Definition at line 119 of file PDBSymbol.h.

References RawSymbol.

◆ getSession()

const IPDBSession& llvm::pdb::PDBSymbol::getSession ( ) const
inline

Definition at line 121 of file PDBSymbol.h.

References getChildStats(), getSymbolByIdHelper(), Session, and Stats.

Referenced by llvm::pdb::PDBSymbolTypeUDT::clone(), and getSymbolType().

◆ getSymbolByIdHelper()

std::unique_ptr< PDBSymbol > PDBSymbol::getSymbolByIdHelper ( uint32_t  Id) const
protected

Definition at line 172 of file PDBSymbol.cpp.

References llvm::pdb::IPDBSession::getSymbolById(), and Session.

Referenced by getConcreteSymbolByIdHelper(), and getSession().

◆ getSymIndexId()

uint32_t PDBSymbol::getSymIndexId ( ) const

Definition at line 131 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by llvm::pdb::PDBSymbolTypeUDT::clone(), clone(), and dumpRight().

◆ getSymTag()

PDB_SymType PDBSymbol::getSymTag ( ) const

Definition at line 130 of file PDBSymbol.cpp.

References RawSymbol.

Referenced by llvm::pdb::PDBSymbolUnknown::classof(), and dumpRight().

Member Data Documentation

◆ RawSymbol

std::unique_ptr<IPDBRawSymbol> llvm::pdb::PDBSymbol::RawSymbol
protected

Definition at line 134 of file PDBSymbol.h.

Referenced by defaultDump(), findAllChildren(), findChildren(), findChildrenByRVA(), findInlineFramesByRVA(), llvm::pdb::PDBSymbolCompilandDetails::getBackEndVersion(), llvm::pdb::PDBSymbolCustom::getDataBytes(), llvm::pdb::PDBSymbolCompilandDetails::getFrontEndVersion(), getRawSymbol(), llvm::pdb::PDBSymbolCompiland::getSourceFileName(), getSymIndexId(), getSymTag(), llvm::pdb::PDBSymbolCompilandEnv::getValue(), llvm::pdb::PDBSymbolAnnotation::PDBSymbolAnnotation(), llvm::pdb::PDBSymbolBlock::PDBSymbolBlock(), llvm::pdb::PDBSymbolCompiland::PDBSymbolCompiland(), llvm::pdb::PDBSymbolCompilandDetails::PDBSymbolCompilandDetails(), llvm::pdb::PDBSymbolCompilandEnv::PDBSymbolCompilandEnv(), llvm::pdb::PDBSymbolCustom::PDBSymbolCustom(), llvm::pdb::PDBSymbolData::PDBSymbolData(), llvm::pdb::PDBSymbolExe::PDBSymbolExe(), llvm::pdb::PDBSymbolFunc::PDBSymbolFunc(), llvm::pdb::PDBSymbolFuncDebugEnd::PDBSymbolFuncDebugEnd(), llvm::pdb::PDBSymbolFuncDebugStart::PDBSymbolFuncDebugStart(), llvm::pdb::PDBSymbolLabel::PDBSymbolLabel(), llvm::pdb::PDBSymbolPublicSymbol::PDBSymbolPublicSymbol(), llvm::pdb::PDBSymbolThunk::PDBSymbolThunk(), llvm::pdb::PDBSymbolTypeArray::PDBSymbolTypeArray(), llvm::pdb::PDBSymbolTypeBaseClass::PDBSymbolTypeBaseClass(), llvm::pdb::PDBSymbolTypeBuiltin::PDBSymbolTypeBuiltin(), llvm::pdb::PDBSymbolTypeCustom::PDBSymbolTypeCustom(), llvm::pdb::PDBSymbolTypeDimension::PDBSymbolTypeDimension(), llvm::pdb::PDBSymbolTypeEnum::PDBSymbolTypeEnum(), llvm::pdb::PDBSymbolTypeFriend::PDBSymbolTypeFriend(), llvm::pdb::PDBSymbolTypeFunctionArg::PDBSymbolTypeFunctionArg(), llvm::pdb::PDBSymbolTypeFunctionSig::PDBSymbolTypeFunctionSig(), llvm::pdb::PDBSymbolTypeManaged::PDBSymbolTypeManaged(), llvm::pdb::PDBSymbolTypePointer::PDBSymbolTypePointer(), llvm::pdb::PDBSymbolTypeTypedef::PDBSymbolTypeTypedef(), llvm::pdb::PDBSymbolTypeUDT::PDBSymbolTypeUDT(), llvm::pdb::PDBSymbolTypeVTable::PDBSymbolTypeVTable(), llvm::pdb::PDBSymbolTypeVTableShape::PDBSymbolTypeVTableShape(), and llvm::pdb::PDBSymbolUsingNamespace::PDBSymbolUsingNamespace().

◆ Session

const IPDBSession& llvm::pdb::PDBSymbol::Session
protected

The documentation for this class was generated from the following files: