mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 23:23:38 -04:00
[PDB] Handle an empty globals hash table with no buckets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316722 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user