diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-12-09 13:12:30 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-12-09 13:12:30 +0000 |
commit | 9fcb7fe51e57a9beb574f4ccaaa04c198ab355f5 (patch) | |
tree | 7033c924babefac340f587372ea41200cdffea93 /llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp | |
parent | fb1fb81406d087057398da8ea0614ef1be32d8f3 (diff) | |
download | bcm5719-llvm-9fcb7fe51e57a9beb574f4ccaaa04c198ab355f5.tar.gz bcm5719-llvm-9fcb7fe51e57a9beb574f4ccaaa04c198ab355f5.zip |
Fix memory leak in unit test.
The StringPool entries are destroyed with the allocator, the string pool
itself is not.
llvm-svn: 289207
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp')
-rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp index 05039875729..7510bc5415e 100644 --- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp @@ -203,7 +203,7 @@ llvm::Error dwarfgen::Generator::init(Triple TheTriple, uint16_t V) { MC->setDwarfVersion(Version); Asm->setDwarfVersion(Version); - StringPool = new DwarfStringPool(Allocator, *Asm, StringRef()); + StringPool = llvm::make_unique<DwarfStringPool>(Allocator, *Asm, StringRef()); return Error::success(); } |