diff options
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp index e47d11cf61a..6fec0e32a8a 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFileBuilder.cpp @@ -87,51 +87,6 @@ Expected<msf::MSFLayout> PDBFileBuilder::finalizeMsfLayout() const { return Msf->build(); } -Expected<std::unique_ptr<PDBFile>> -PDBFileBuilder::build(std::unique_ptr<msf::WritableStream> PdbFileBuffer) { - auto ExpectedLayout = finalizeMsfLayout(); - if (!ExpectedLayout) - return ExpectedLayout.takeError(); - - auto File = llvm::make_unique<PDBFile>(std::move(PdbFileBuffer), Allocator); - File->ContainerLayout = *ExpectedLayout; - - if (Info) { - auto ExpectedInfo = Info->build(*File); - if (!ExpectedInfo) - return ExpectedInfo.takeError(); - File->Info = std::move(*ExpectedInfo); - } - - if (Dbi) { - auto ExpectedDbi = Dbi->build(*File); - if (!ExpectedDbi) - return ExpectedDbi.takeError(); - File->Dbi = std::move(*ExpectedDbi); - } - - if (Tpi) { - auto ExpectedTpi = Tpi->build(*File); - if (!ExpectedTpi) - return ExpectedTpi.takeError(); - File->Tpi = std::move(*ExpectedTpi); - } - - if (Ipi) { - auto ExpectedIpi = Ipi->build(*File); - if (!ExpectedIpi) - return ExpectedIpi.takeError(); - File->Ipi = std::move(*ExpectedIpi); - } - - if (File->Info && File->Dbi && File->Info->getAge() != File->Dbi->getAge()) - return llvm::make_error<RawError>( - raw_error_code::corrupt_file, - "PDB Stream Age doesn't match Dbi Stream Age!"); - - return std::move(File); -} - Error PDBFileBuilder::commit(StringRef Filename) { auto ExpectedLayout = finalizeMsfLayout(); if (!ExpectedLayout) |