summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
index 859295d2c7d..f158c5c5386 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
@@ -338,7 +338,7 @@ Expected<SymbolStream &> PDBFile::getPDBSymbolStream() {
}
Expected<PDBStringTable &> PDBFile::getStringTable() {
- if (!Strings) {
+ if (!Strings || !PDBStringTableStream) {
auto IS = getPDBInfoStream();
if (!IS)
return IS.takeError();
@@ -350,13 +350,12 @@ Expected<PDBStringTable &> PDBFile::getStringTable() {
if (!NS)
return NS.takeError();
- auto N = llvm::make_unique<PDBStringTable>();
BinaryStreamReader Reader(**NS);
- if (auto EC = N->reload(Reader))
+ auto N = llvm::make_unique<PDBStringTable>();
+ if (auto EC = N->load(Reader))
return std::move(EC);
- assert(Reader.bytesRemaining() == 0);
- StringTableStream = std::move(*NS);
Strings = std::move(N);
+ PDBStringTableStream = std::move(*NS);
}
return *Strings;
}
OpenPOWER on IntegriCloud