LLVM: lib/DebugInfo/PDB/Native/NativeExeSymbol.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
10
18
19using namespace llvm;
21
24 if (DbiS)
25 return &DbiS.get();
26
28 return nullptr;
29}
30
34
35std::unique_ptr
37 switch (Type) {
40 break;
41 }
43 return Session.getSymbolCache().createTypeEnumerator(codeview::LF_ARRAY);
45 return Session.getSymbolCache().createTypeEnumerator(codeview::LF_ENUM);
47 return Session.getSymbolCache().createTypeEnumerator(codeview::LF_POINTER);
49 return Session.getSymbolCache().createTypeEnumerator(
50 {codeview::LF_STRUCTURE, codeview::LF_CLASS, codeview::LF_UNION,
51 codeview::LF_INTERFACE});
53 return Session.getSymbolCache().createTypeEnumerator(codeview::LF_VTSHAPE);
55 return Session.getSymbolCache().createTypeEnumerator(
56 {codeview::LF_PROCEDURE, codeview::LF_MFUNCTION});
58 return Session.getSymbolCache().createGlobalsEnumerator(codeview::S_UDT);
59
60 default:
61 break;
62 }
63 return nullptr;
64}
65
67 auto IS = Session.getPDBFile().getPDBInfoStream();
68 if (IS)
69 return IS->getAge();
71 return 0;
72}
73
75 return std::string(Session.getPDBFile().getFilePath());
76}
77
79 auto IS = Session.getPDBFile().getPDBInfoStream();
80 if (IS)
81 return IS->getGuid();
84}
85
87 auto Dbi = Session.getPDBFile().getPDBDbiStream();
88 if (Dbi)
89 return Dbi->hasCTypes();
91 return false;
92}
93
95 auto Dbi = Session.getPDBFile().getPDBDbiStream();
96 if (Dbi)
97 return !Dbi->isStripped();
99 return false;
100}
static DbiStream * getDbiStreamPtr(NativeSession &Session)
Definition NativeExeSymbol.cpp:22
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
reference get()
Returns a reference to the stored T value.
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const override
Definition NativeExeSymbol.cpp:36
codeview::GUID getGuid() const override
Definition NativeExeSymbol.cpp:78
uint32_t getAge() const override
Definition NativeExeSymbol.cpp:66
bool hasCTypes() const override
Definition NativeExeSymbol.cpp:86
bool hasPrivateSymbols() const override
Definition NativeExeSymbol.cpp:94
NativeExeSymbol(NativeSession &Session, SymIndexId Id)
Definition NativeExeSymbol.cpp:31
std::string getSymbolsFileName() const override
Definition NativeExeSymbol.cpp:74
NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, SymIndexId SymbolId)
Expected< DbiStream & > getPDBDbiStream()
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.
void consumeError(Error Err)
Consume a Error without doing anything.
This represents the 'GUID' type from windows.h.