Error finalizeMsfLayout();
- Expected<std::unique_ptr<DbiStream>> build(PDBFile &File,
- const msf::WritableStream &Buffer);
+ Expected<std::unique_ptr<DbiStream>> build(PDBFile &File);
Error commit(const msf::MSFLayout &Layout,
const msf::WritableStream &Buffer);
Error finalizeMsfLayout();
- Expected<std::unique_ptr<InfoStream>>
- build(PDBFile &File, const msf::WritableStream &Buffer);
+ Expected<std::unique_ptr<InfoStream>> build(PDBFile &File);
Error commit(const msf::MSFLayout &Layout,
const msf::WritableStream &Buffer) const;
Error finalizeMsfLayout();
- Expected<std::unique_ptr<TpiStream>> build(PDBFile &File,
- const msf::WritableStream &Buffer);
+ Expected<std::unique_ptr<TpiStream>> build(PDBFile &File);
Error commit(const msf::MSFLayout &Layout, const msf::WritableStream &Buffer);
}
Expected<std::unique_ptr<DbiStream>>
-DbiStreamBuilder::build(PDBFile &File, const msf::WritableStream &Buffer) {
+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(),
- Buffer, StreamDBI);
+ 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);
}
Expected<std::unique_ptr<InfoStream>>
-InfoStreamBuilder::build(PDBFile &File, const msf::WritableStream &Buffer) {
- auto StreamData = MappedBlockStream::createIndexedStream(File.getMsfLayout(),
- Buffer, StreamPDB);
+InfoStreamBuilder::build(PDBFile &File) {
+ auto StreamData = MappedBlockStream::createIndexedStream(
+ File.getMsfLayout(), File.getMsfBuffer(), StreamPDB);
auto Info = llvm::make_unique<InfoStream>(std::move(StreamData));
Info->Version = Ver;
Info->Signature = Sig;
File->ContainerLayout = *ExpectedLayout;
if (Info) {
- auto ExpectedInfo = Info->build(*File, *PdbFileBuffer);
+ auto ExpectedInfo = Info->build(*File);
if (!ExpectedInfo)
return ExpectedInfo.takeError();
File->Info = std::move(*ExpectedInfo);
}
if (Dbi) {
- auto ExpectedDbi = Dbi->build(*File, *PdbFileBuffer);
+ auto ExpectedDbi = Dbi->build(*File);
if (!ExpectedDbi)
return ExpectedDbi.takeError();
File->Dbi = std::move(*ExpectedDbi);
}
if (Tpi) {
- auto ExpectedTpi = Tpi->build(*File, *PdbFileBuffer);
+ auto ExpectedTpi = Tpi->build(*File);
if (!ExpectedTpi)
return ExpectedTpi.takeError();
File->Tpi = std::move(*ExpectedTpi);
}
if (Ipi) {
- auto ExpectedIpi = Ipi->build(*File, *PdbFileBuffer);
+ auto ExpectedIpi = Ipi->build(*File);
if (!ExpectedIpi)
return ExpectedIpi.takeError();
File->Ipi = std::move(*ExpectedIpi);
return Error::success();
}
-Expected<std::unique_ptr<TpiStream>>
-TpiStreamBuilder::build(PDBFile &File, const msf::WritableStream &Buffer) {
+Expected<std::unique_ptr<TpiStream>> TpiStreamBuilder::build(PDBFile &File) {
if (!VerHeader.hasValue())
return make_error<RawError>(raw_error_code::unspecified,
"Missing TPI Stream Version");
if (auto EC = finalize())
return std::move(EC);
- auto StreamData =
- MappedBlockStream::createIndexedStream(File.getMsfLayout(), Buffer, Idx);
+ auto StreamData = MappedBlockStream::createIndexedStream(
+ File.getMsfLayout(), File.getMsfBuffer(), Idx);
auto Tpi = llvm::make_unique<TpiStream>(File, std::move(StreamData));
Tpi->Header = Header;
Tpi->TypeRecords = VarStreamArray<codeview::CVType>(TypeRecordStream);