LLVM: lib/DebugInfo/PDB/Native/NativeEnumGlobals.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
10
19
20using namespace llvm;
23
25 std::vectorcodeview::SymbolKind Kinds)
26 : Index(0), Session(PDBSession) {
29 for (uint32_t Off : GS.getGlobalsTable()) {
30 CVSymbol S = SS.readRecord(Off);
32 continue;
33 MatchOffsets.push_back(Off);
34 }
35}
36
38 return static_cast<uint32_t>(MatchOffsets.size());
39}
40
41std::unique_ptr
43 if (N >= MatchOffsets.size())
44 return nullptr;
45
47 Session.getSymbolCache().getOrCreateGlobalSymbolByOffset(MatchOffsets[N]);
48 return Session.getSymbolCache().getSymbolById(Id);
49}
50
54
uint32_t getChildCount() const override
Definition NativeEnumGlobals.cpp:37
NativeEnumGlobals(NativeSession &Session, std::vector< codeview::SymbolKind > Kinds)
Definition NativeEnumGlobals.cpp:24
std::unique_ptr< PDBSymbol > getChildAtIndex(uint32_t Index) const override
Definition NativeEnumGlobals.cpp:42
std::unique_ptr< PDBSymbol > getNext() override
Definition NativeEnumGlobals.cpp:51
void reset() override
Definition NativeEnumGlobals.cpp:55
CVRecord< SymbolKind > CVSymbol
This is an optimization pass for GlobalISel generic memory operations.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
bool is_contained(R &&Range, const E &Element)
Returns true if Element is found in Range.