Go to the documentation of this file.
9 #ifndef LLVM_DEBUGINFO_PDB_PDBSYMBOL_H
10 #define LLVM_DEBUGINFO_PDB_PDBSYMBOL_H
17 #define FORWARD_SYMBOL_METHOD(MethodName) \
18 decltype(auto) MethodName() const { return RawSymbol->MethodName(); }
20 #define FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(ConcreteType, PrivateName, \
22 decltype(auto) PublicName##Id() const { \
23 return RawSymbol->PrivateName##Id(); \
25 std::unique_ptr<ConcreteType> PublicName() const { \
26 uint32_t Id = PublicName##Id(); \
27 return getConcreteSymbolByIdHelper<ConcreteType>(Id); \
30 #define FORWARD_SYMBOL_ID_METHOD_WITH_NAME(PrivateName, PublicName) \
31 FORWARD_CONCRETE_SYMBOL_ID_METHOD_WITH_NAME(PDBSymbol, PrivateName, \
34 #define FORWARD_SYMBOL_ID_METHOD(MethodName) \
35 FORWARD_SYMBOL_ID_METHOD_WITH_NAME(MethodName, MethodName)
46 template <
typename ChildType>
class ConcreteSymbolEnumerator;
48 #define DECLARE_PDB_SYMBOL_CONCRETE_TYPE(TagValue) \
50 using PDBSymbol::PDBSymbol; \
51 friend class PDBSymbol; \
54 static const PDB_SymType Tag = TagValue; \
55 static bool classof(const PDBSymbol *S) { return S->getSymTag() == Tag; }
57 #define DECLARE_PDB_SYMBOL_CUSTOM_TYPE(Condition) \
59 using PDBSymbol::PDBSymbol; \
60 friend class PDBSymbol; \
63 static bool classof(const PDBSymbol *S) { return Condition; }
72 static std::unique_ptr<PDBSymbol> createSymbol(
const IPDBSession &PDBSession,
80 static std::unique_ptr<PDBSymbol>
82 std::unique_ptr<IPDBRawSymbol>
RawSymbol);
86 template <
typename ConcreteT>
87 static std::unique_ptr<ConcreteT>
89 std::unique_ptr<IPDBRawSymbol>
RawSymbol) {
91 return unique_dyn_cast_or_null<ConcreteT>(
std::move(
S));
93 template <
typename ConcreteT>
97 return unique_dyn_cast_or_null<ConcreteT>(
std::move(
S));
127 template <
typename T>
132 return std::make_unique<ConcreteSymbolEnumerator<T>>(
std::move(BaseIter));
137 std::unique_ptr<IPDBEnumSymbols>
146 std::unique_ptr<IPDBEnumLineNumbers>
148 std::unique_ptr<IPDBEnumLineNumbers>
163 template <
typename ConcreteType>
static std::unique_ptr< ConcreteT > createAs(const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
std::string getName() const
This is an optimization pass for GlobalISel generic memory operations.
void dumpChildStats() const
std::unique_ptr< IPDBRawSymbol > OwnedRawSymbol
The instances of the Type class are immutable: once they are created, they are never changed.
void defaultDump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) const
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
static std::unique_ptr< PDBSymbol > create(const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
virtual void dump(PDBSymDumper &Dumper) const =0
Dumps the contents of a symbol a raw_ostream.
virtual std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const =0
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const
PDBSymbol(const IPDBSession &PDBSession)
static std::unique_ptr< ConcreteT > createAs(const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e....
This class implements an extremely fast bulk output stream that can only output to a stream.
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
std::unique_ptr< PDBSymbol > getSymbolByIdHelper(uint32_t Id) const
uint32_t getSymIndexId() const
std::unique_ptr< ConcreteType > getConcreteSymbolByIdHelper(uint32_t Id) const
std::unique_ptr< IPDBEnumSymbols > getChildStats(TagStats &Stats) const
std::unique_ptr< IPDBEnumSymbols > findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const
const IPDBRawSymbol & getRawSymbol() const
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByVA(uint64_t VA, uint32_t Length) const
std::unique_ptr< T > findOneChild() const
const IPDBSession & Session
IPDBRawSymbol & getRawSymbol()
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags) const
StringRef - Represent a constant reference to a string, i.e.
IPDBRawSymbol * RawSymbol
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
std::unordered_map< PDB_SymType, int > TagStats
block placement Basic Block Placement Stats
const IPDBSession & getSession() const
virtual void dumpRight(PDBSymDumper &Dumper) const
For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right...
PDB_SymType getSymTag() const
std::unique_ptr< ConcreteSymbolEnumerator< T > > findAllChildren() const
IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByRVA(uint32_t RVA) const
Optional< std::vector< StOtherPiece > > Other
void dumpProperties() const
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByVA(uint64_t VA) const