diff options
author | Zachary Turner <zturner@google.com> | 2016-07-22 19:56:26 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2016-07-22 19:56:26 +0000 |
commit | e109dc63f95eae32772335d131935b073594a7ce (patch) | |
tree | 73bc246d8e63f5b9e692e5ec87d157a804926878 /llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | |
parent | bac69d33d013a86277cf2acb9809819e1623c732 (diff) | |
download | llvm-e109dc63f95eae32772335d131935b073594a7ce.zip llvm-e109dc63f95eae32772335d131935b073594a7ce.tar.gz llvm-e109dc63f95eae32772335d131935b073594a7ce.tar.bz2 |
[pdb] Have builders share a single BumpPtrAllocator.
This makes it easier to have the writable and readable PDB
interfaces share code since the read/write and write-only
interfaces now share a single allocator, you don't have to worry
about a builder building a read only interface and then having
the read-only interface's data become corrupt when the builder
goes out of scope. Now the allocator is specified explicitly
to all constructors, so all interfaces can share a single allocator
that is scoped appropriately.
llvm-svn: 276459
Diffstat (limited to 'llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp')
-rw-r--r-- | llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp index b44a474..e2edf38 100644 --- a/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp +++ b/llvm/lib/DebugInfo/PDB/Raw/PDBFile.cpp @@ -36,8 +36,9 @@ namespace { typedef FixedStreamArray<support::ulittle32_t> ulittle_array; } -PDBFile::PDBFile(std::unique_ptr<StreamInterface> PdbFileBuffer) - : Buffer(std::move(PdbFileBuffer)), SB(nullptr) {} +PDBFile::PDBFile(std::unique_ptr<StreamInterface> PdbFileBuffer, + BumpPtrAllocator &Allocator) + : Allocator(Allocator), Buffer(std::move(PdbFileBuffer)), SB(nullptr) {} PDBFile::~PDBFile() {} |