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/GSIStreamBuilder.cpp
Show First 20 Lines • Show All 251 Lines • ▼ Show 20 Lines | static std::vector<ulittle32_t> computeAddrMap(ArrayRef<CVSymbol> Records) { | ||||
DeserializedPublics.reserve(Records.size()); | DeserializedPublics.reserve(Records.size()); | ||||
PublicsByAddr.reserve(Records.size()); | PublicsByAddr.reserve(Records.size()); | ||||
SymOffsets.reserve(Records.size()); | SymOffsets.reserve(Records.size()); | ||||
uint32_t SymOffset = 0; | uint32_t SymOffset = 0; | ||||
for (const CVSymbol &Sym : Records) { | for (const CVSymbol &Sym : Records) { | ||||
assert(Sym.kind() == SymbolKind::S_PUB32); | assert(Sym.kind() == SymbolKind::S_PUB32); | ||||
DeserializedPublics.push_back( | DeserializedPublics.push_back( | ||||
cantFail(SymbolDeserializer::deserializeAs<PublicSym32>(Sym))); | llvm_cantFail(SymbolDeserializer::deserializeAs<PublicSym32>(Sym))); | ||||
PublicsByAddr.emplace_back(&Sym, &DeserializedPublics.back()); | PublicsByAddr.emplace_back(&Sym, &DeserializedPublics.back()); | ||||
SymOffsets.push_back(SymOffset); | SymOffsets.push_back(SymOffset); | ||||
SymOffset += Sym.length(); | SymOffset += Sym.length(); | ||||
} | } | ||||
llvm::stable_sort(PublicsByAddr, comparePubSymByAddrAndName); | llvm::stable_sort(PublicsByAddr, comparePubSymByAddrAndName); | ||||
// Fill in the symbol offsets in the appropriate order. | // Fill in the symbol offsets in the appropriate order. | ||||
std::vector<ulittle32_t> AddrMap; | std::vector<ulittle32_t> AddrMap; | ||||
▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines |