Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/DebugInfo/PDB/Native/NativeEnumGlobals.cpp
Show All 17 Lines | |||||
using namespace llvm; | using namespace llvm; | ||||
using namespace llvm::codeview; | using namespace llvm::codeview; | ||||
using namespace llvm::pdb; | using namespace llvm::pdb; | ||||
NativeEnumGlobals::NativeEnumGlobals(NativeSession &PDBSession, | NativeEnumGlobals::NativeEnumGlobals(NativeSession &PDBSession, | ||||
std::vector<codeview::SymbolKind> Kinds) | std::vector<codeview::SymbolKind> Kinds) | ||||
: Index(0), Session(PDBSession) { | : Index(0), Session(PDBSession) { | ||||
GlobalsStream &GS = cantFail(Session.getPDBFile().getPDBGlobalsStream()); | GlobalsStream &GS = llvm_cantFail(Session.getPDBFile().getPDBGlobalsStream()); | ||||
SymbolStream &SS = cantFail(Session.getPDBFile().getPDBSymbolStream()); | SymbolStream &SS = llvm_cantFail(Session.getPDBFile().getPDBSymbolStream()); | ||||
for (uint32_t Off : GS.getGlobalsTable()) { | for (uint32_t Off : GS.getGlobalsTable()) { | ||||
CVSymbol S = SS.readRecord(Off); | CVSymbol S = SS.readRecord(Off); | ||||
if (!llvm::is_contained(Kinds, S.kind())) | if (!llvm::is_contained(Kinds, S.kind())) | ||||
continue; | continue; | ||||
MatchOffsets.push_back(Off); | MatchOffsets.push_back(Off); | ||||
} | } | ||||
} | } | ||||
Show All 19 Lines |