summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-11-22 20:32:22 +0000
committerRui Ueyama <ruiu@google.com>2016-11-22 20:32:22 +0000
commit2b4ba04d57b35d638e15d71ec6d1e8622e1ea49a (patch)
treea7d5ce91d8efea030ccdf6dd1542043c83be5277 /llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
parente99e8d345c0bde318befd55cb5ce14d787f960f6 (diff)
downloadbcm5719-llvm-2b4ba04d57b35d638e15d71ec6d1e8622e1ea49a.tar.gz
bcm5719-llvm-2b4ba04d57b35d638e15d71ec6d1e8622e1ea49a.zip
Remove PDBFileBuilder::build() and related functions.
PDBFileBuilder supports two different ways to create files. One is PDBFileBuilder::commit. That function takes a filename and write a result to the file. The other is PDBFileBuilder::build. That returns a new PDBFile object. This patch removes the latter because no one is using it and in a real life situation we are very unlikely to need it. Even if you need it, it'd be easy to write a new PDB to a memory buffer and read it back. Removing PDBFileBuilder::build enables us to remove other classes build transitively. Differential Revision: https://reviews.llvm.org/D26987 llvm-svn: 287697
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
index 33c07ffa3b8..1d5b8d693b1 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/DbiStreamBuilder.cpp
@@ -357,27 +357,6 @@ std::vector<SecMapEntry> DbiStreamBuilder::createSectionMap(
return Ret;
}
-Expected<std::unique_ptr<DbiStream>>
-DbiStreamBuilder::build(PDBFile &File) {
- if (!VerHeader.hasValue())
- return make_error<RawError>(raw_error_code::unspecified,
- "Missing DBI Stream Version");
- if (auto EC = finalize())
- return std::move(EC);
-
- auto StreamData = MappedBlockStream::createIndexedStream(
- File.getMsfLayout(), File.getMsfBuffer(), StreamDBI);
- auto Dbi = llvm::make_unique<DbiStream>(File, std::move(StreamData));
- Dbi->Header = Header;
- Dbi->FileInfoSubstream = ReadableStreamRef(FileInfoBuffer);
- Dbi->ModInfoSubstream = ReadableStreamRef(ModInfoBuffer);
- if (auto EC = Dbi->initializeModInfoArray())
- return std::move(EC);
- if (auto EC = Dbi->initializeFileInfo())
- return std::move(EC);
- return std::move(Dbi);
-}
-
Error DbiStreamBuilder::commit(const msf::MSFLayout &Layout,
const msf::WritableStream &Buffer) {
if (auto EC = finalize())
OpenPOWER on IntegriCloud