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)
46template <
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) {
90 std::unique_ptr<PDBSymbol> S =
create(PDBSession, std::move(
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>
block placement Basic Block Placement Stats
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
virtual std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const =0
IPDBSession defines an interface used to provide a context for querying debug information from a debu...
PDBSymbol defines the base of the inheritance hierarchy for concrete symbol types (e....
uint32_t getSymIndexId() const
PDB_SymType getSymTag() const
static std::unique_ptr< ConcreteT > createAs(const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
void dumpChildStats() const
IPDBRawSymbol & getRawSymbol()
const IPDBSession & Session
std::unique_ptr< T > findOneChild() const
std::unique_ptr< PDBSymbol > getSymbolByIdHelper(uint32_t Id) const
static std::unique_ptr< ConcreteT > createAs(const IPDBSession &PDBSession, IPDBRawSymbol &RawSymbol)
std::unique_ptr< ConcreteSymbolEnumerator< T > > findAllChildren() const
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByVA(uint64_t VA) const
void dumpProperties() const
virtual void dump(PDBSymDumper &Dumper) const =0
Dumps the contents of a symbol a raw_ostream.
std::unique_ptr< IPDBEnumSymbols > findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags, uint32_t RVA) const
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const
std::unique_ptr< IPDBEnumSymbols > findInlineFramesByRVA(uint32_t RVA) const
std::string getName() const
void defaultDump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags) const
virtual void dumpRight(PDBSymDumper &Dumper) const
For certain PDBSymbolTypes, dumps additional information for the type that normally goes on the right...
std::unique_ptr< IPDBRawSymbol > OwnedRawSymbol
std::unique_ptr< ConcreteType > getConcreteSymbolByIdHelper(uint32_t Id) const
std::unique_ptr< IPDBEnumLineNumbers > findInlineeLinesByVA(uint64_t VA, uint32_t Length) const
const IPDBRawSymbol & getRawSymbol() const
IPDBRawSymbol * RawSymbol
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags) const
const IPDBSession & getSession() const
static std::unique_ptr< PDBSymbol > create(const IPDBSession &PDBSession, std::unique_ptr< IPDBRawSymbol > RawSymbol)
std::unique_ptr< IPDBEnumSymbols > getChildStats(TagStats &Stats) const
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::unordered_map< PDB_SymType, int > TagStats
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
This is an optimization pass for GlobalISel generic memory operations.