llvm.org GIT mirror llvm / eb271e8
[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 Reid Kleckner 2 years ago
4 changed file(s) with 14 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
116116 return EC;
117117 if (auto EC = readGSIHashRecords(HashRecords, HashHdr, Reader))
118118 return EC;
119 if (auto EC = readGSIHashBuckets(HashBuckets, HashBitmap, HashHdr, Reader))
120 return EC;
119 if (HashHdr->HrSize > 0)
120 if (auto EC = readGSIHashBuckets(HashBuckets, HashBitmap, HashHdr, Reader))
121 return EC;
121122 return Error::success();
122123 }
0 RUN: llvm-pdbutil dump -globals %S/Inputs/pdbdump-globals-empty.pdb | FileCheck %s
1
2 CHECK: Global Symbols
3 CHECK: ============================================================
4 CHECK: Records
5 CHECK-NOT: S_
638638 }
639639
640640 auto &SymbolRecords = cantFail(getPdb().getPDBSymbolStream());
641 auto &Globals = cantFail(getPdb().getPDBGlobalsStream());
642
643 for (uint32_t PubSymOff : Globals.getGlobalsTable()) {
641 auto ExpGlobals = getPdb().getPDBGlobalsStream();
642 if (!ExpGlobals)
643 return ExpGlobals.takeError();
644
645 for (uint32_t PubSymOff : ExpGlobals->getGlobalsTable()) {
644646 CVSymbol Sym = SymbolRecords.readRecord(PubSymOff);
645647 HandleOneSymbol(Sym);
646648 }