LLVM  8.0.1
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, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) const
 
void dumpProperties () const
 
void dumpChildStats () const
 
PDB_SymType getSymTag () const
 
uint32_t getSymIndexId () const
 
template<typename T >
std::unique_ptr< TfindOneChild () 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 > RawSymbol)
 
static std::unique_ptr< PDBSymbolcreate (const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
 
template<typename ConcreteT >
static std::unique_ptr< ConcreteT > createAs (const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
 
template<typename ConcreteT >
static std::unique_ptr< ConcreteT > createAs (const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
 

Protected Member Functions

 PDBSymbol (const IPDBSession &PDBSession)
 
 PDBSymbol (PDBSymbol &&Other)
 
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< IPDBRawSymbolOwnedRawSymbol
 
IPDBRawSymbolRawSymbol = nullptr
 

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 74 of file PDBSymbol.h.

Constructor & Destructor Documentation

◆ PDBSymbol() [1/2]

PDBSymbol::PDBSymbol ( const IPDBSession PDBSession)
explicitprotected

Definition at line 53 of file PDBSymbol.cpp.

◆ PDBSymbol() [2/2]

PDBSymbol::PDBSymbol ( PDBSymbol &&  Other)
protected

Definition at line 55 of file PDBSymbol.cpp.

References Other, and ~PDBSymbol().

◆ ~PDBSymbol()

PDBSymbol::~PDBSymbol ( )
virtualdefault

Referenced by createAs(), and PDBSymbol().

Member Function Documentation

◆ create() [1/2]

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

◆ create() [2/2]

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

Definition at line 111 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.

◆ createAs() [1/2]

template<typename ConcreteT >
static std::unique_ptr<ConcreteT> llvm::pdb::PDBSymbol::createAs ( const IPDBSession PDBSession,
std::unique_ptr< IPDBRawSymbol RawSymbol 
)
inlinestatic

Definition at line 91 of file PDBSymbol.h.

References create().

◆ createAs() [2/2]

template<typename ConcreteT >
static std::unique_ptr<ConcreteT> llvm::pdb::PDBSymbol::createAs ( const IPDBSession PDBSession,
IPDBRawSymbol RawSymbol 
)
inlinestatic

Definition at line 97 of file PDBSymbol.h.

References create(), dump(), and ~PDBSymbol().

◆ defaultDump()

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

Definition at line 118 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::dump(), and 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 130 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 124 of file PDBSymbol.cpp.

References llvm::pdb::All, defaultDump(), llvm::raw_ostream::flush(), llvm::pdb::None, 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 113 of file PDBSymbol.h.

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

◆ 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 148 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildren(), and RawSymbol.

◆ findAllChildren() [3/3]

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

Definition at line 143 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 153 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildren(), and 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 159 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findChildrenByRVA(), and RawSymbol.

Referenced by findAllChildren().

◆ findInlineFramesByRVA()

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

Definition at line 165 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::findInlineFramesByRVA(), and RawSymbol.

Referenced by findAllChildren().

◆ findOneChild()

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

Definition at line 123 of file PDBSymbol.h.

References llvm::Enumerator.

◆ getChildStats()

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

Definition at line 170 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 160 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 150 of file PDBSymbol.h.

References RawSymbol.

◆ getSession()

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

Definition at line 152 of file PDBSymbol.h.

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

Referenced by getSymbolType().

◆ getSymbolByIdHelper()

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

Definition at line 182 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 141 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymIndexId(), and RawSymbol.

Referenced by dumpRight().

◆ getSymTag()

PDB_SymType PDBSymbol::getSymTag ( ) const

Definition at line 140 of file PDBSymbol.cpp.

References llvm::pdb::IPDBRawSymbol::getSymTag(), and RawSymbol.

Referenced by dumpRight().

Member Data Documentation

◆ OwnedRawSymbol

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

Definition at line 165 of file PDBSymbol.h.

◆ RawSymbol

IPDBRawSymbol* llvm::pdb::PDBSymbol::RawSymbol = nullptr
protected

◆ Session

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

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