The StringPool entries are destroyed with the allocator, the string pool
itself is not.
llvm-svn: 289207
MC->setDwarfVersion(Version);
Asm->setDwarfVersion(Version);
- StringPool = new DwarfStringPool(Allocator, *Asm, StringRef());
+ StringPool = llvm::make_unique<DwarfStringPool>(Allocator, *Asm, StringRef());
return Error::success();
}
MCStreamer *MS; // Owned by AsmPrinter
std::unique_ptr<TargetMachine> TM;
std::unique_ptr<AsmPrinter> Asm;
- DwarfStringPool *StringPool; // Owned by Allocator
- std::vector<std::unique_ptr<CompileUnit>> CompileUnits;
BumpPtrAllocator Allocator;
+ std::unique_ptr<DwarfStringPool> StringPool; // Entries owned by Allocator.
+ std::vector<std::unique_ptr<CompileUnit>> CompileUnits;
DIEAbbrevSet Abbreviations;
SmallString<4096> FileBytes;