Revert r301986 (and subsequent r301987).
The patch is failing to add StringTableStreamBuilder.h, but that isn't
even discovered because the corresponding StringTableStreamBuilder.cpp
isn't added to any CMakeLists.txt file and thus never built. I think
this patch is just incomplete.
llvm-svn: 302002
diff --git a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
index 859295d..f158c5c 100644
--- a/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
+++ b/llvm/lib/DebugInfo/PDB/Native/PDBFile.cpp
@@ -338,7 +338,7 @@
}
Expected<PDBStringTable &> PDBFile::getStringTable() {
- if (!Strings) {
+ if (!Strings || !PDBStringTableStream) {
auto IS = getPDBInfoStream();
if (!IS)
return IS.takeError();
@@ -350,13 +350,12 @@
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;
}