mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 06:10:48 +00:00
[PDB] Handle an empty globals hash table with no buckets
llvm-svn: 316722
This commit is contained in:
parent
43169fb407
commit
06bac2866b
@ -117,7 +117,8 @@ Error GSIHashTable::read(BinaryStreamReader &Reader) {
|
||||
return EC;
|
||||
if (auto EC = readGSIHashRecords(HashRecords, HashHdr, Reader))
|
||||
return EC;
|
||||
if (auto EC = readGSIHashBuckets(HashBuckets, HashBitmap, HashHdr, Reader))
|
||||
return EC;
|
||||
if (HashHdr->HrSize > 0)
|
||||
if (auto EC = readGSIHashBuckets(HashBuckets, HashBitmap, HashHdr, Reader))
|
||||
return EC;
|
||||
return Error::success();
|
||||
}
|
||||
|
BIN
test/DebugInfo/PDB/Inputs/pdbdump-globals-empty.pdb
Normal file
BIN
test/DebugInfo/PDB/Inputs/pdbdump-globals-empty.pdb
Normal file
Binary file not shown.
6
test/DebugInfo/PDB/pdbdump-globals-empty.test
Normal file
6
test/DebugInfo/PDB/pdbdump-globals-empty.test
Normal file
@ -0,0 +1,6 @@
|
||||
RUN: llvm-pdbutil dump -globals %S/Inputs/pdbdump-globals-empty.pdb | FileCheck %s
|
||||
|
||||
CHECK: Global Symbols
|
||||
CHECK: ============================================================
|
||||
CHECK: Records
|
||||
CHECK-NOT: S_
|
@ -639,9 +639,11 @@ Error DumpOutputStyle::dumpUdtStats() {
|
||||
}
|
||||
|
||||
auto &SymbolRecords = cantFail(getPdb().getPDBSymbolStream());
|
||||
auto &Globals = cantFail(getPdb().getPDBGlobalsStream());
|
||||
auto ExpGlobals = getPdb().getPDBGlobalsStream();
|
||||
if (!ExpGlobals)
|
||||
return ExpGlobals.takeError();
|
||||
|
||||
for (uint32_t PubSymOff : Globals.getGlobalsTable()) {
|
||||
for (uint32_t PubSymOff : ExpGlobals->getGlobalsTable()) {
|
||||
CVSymbol Sym = SymbolRecords.readRecord(PubSymOff);
|
||||
HandleOneSymbol(Sym);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user