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, 5 insertions, 4 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
index f158c5c5386..859295d2c7d 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 || !PDBStringTableStream) {
+ if (!Strings) {
auto IS = getPDBInfoStream();
if (!IS)
return IS.takeError();
@@ -350,12 +350,13 @@ Expected<PDBStringTable &> PDBFile::getStringTable() {
if (!NS)
return NS.takeError();
- BinaryStreamReader Reader(**NS);
auto N = llvm::make_unique<PDBStringTable>();
- if (auto EC = N->load(Reader))
+ BinaryStreamReader Reader(**NS);
+ if (auto EC = N->reload(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