summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-12-09 13:33:41 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-12-09 13:33:41 +0000
commiteedc4059c3bf4a8be7ffc86a7a5fc3f7504aa4a0 (patch)
tree8216a9389cb1c1a393aad2e214387e5d9a9176cd /llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
parent9fcb7fe51e57a9beb574f4ccaaa04c198ab355f5 (diff)
downloadbcm5719-llvm-eedc4059c3bf4a8be7ffc86a7a5fc3f7504aa4a0.tar.gz
bcm5719-llvm-eedc4059c3bf4a8be7ffc86a7a5fc3f7504aa4a0.zip
Plug another leak in the DWARF unittests, DIEInlineStrings are never destroyed.
llvm-svn: 289208
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp')
-rw-r--r--llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
index 7510bc5415e..5640cece4ea 100644
--- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
+++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.cpp
@@ -61,7 +61,8 @@ void dwarfgen::DIE::addAttribute(uint16_t A, dwarf::Form Form,
auto &DG = CU->getGenerator();
if (Form == DW_FORM_string) {
Die->addValue(DG.getAllocator(), static_cast<dwarf::Attribute>(A), Form,
- new (DG.getAllocator()) DIEInlineString(String));
+ new (DG.getAllocator())
+ DIEInlineString(String, DG.getAllocator()));
} else {
Die->addValue(
DG.getAllocator(), static_cast<dwarf::Attribute>(A), Form,
OpenPOWER on IntegriCloud