summaryrefslogtreecommitdiffstats
path: root/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2016-11-03 18:28:04 +0000
committerJustin Bogner <mail@justinbogner.com>2016-11-03 18:28:04 +0000
commitf9fb2abb01ea82a43b5938e3a24de9d8c6790e46 (patch)
tree757660f33ba2e98112616b8b9ac1a931ea0a115f /llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp
parent271194016acfe2b4eb51733ee7938abf81245cdd (diff)
downloadbcm5719-llvm-f9fb2abb01ea82a43b5938e3a24de9d8c6790e46.tar.gz
bcm5719-llvm-f9fb2abb01ea82a43b5938e3a24de9d8c6790e46.zip
PDB: Fix some APIs to avoid use-after-frees
The buffer is already owned by the PDBFile for all of these APIs, so don't pass it in separately. llvm-svn: 285953
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp')
-rw-r--r--llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp b/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp
index 991e32d4ac7..e909c30e95f 100644
--- a/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp
+++ b/llvm/lib/DebugInfo/PDB/Raw/InfoStreamBuilder.cpp
@@ -48,9 +48,9 @@ Error InfoStreamBuilder::finalizeMsfLayout() {
}
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;
OpenPOWER on IntegriCloud