diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-04-25 20:00:34 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-04-25 20:00:34 +0000 |
commit | 12d5224df6df05dc1189788591c381f467f5ff25 (patch) | |
tree | bad04f40bd47ad13a98b05e748fc1e4de4dfb23f /lib/CodeGen/AsmPrinter/DwarfDebug.h | |
parent | 172515f0be61f91c3a67206c6627c5e2572bdb26 (diff) | |
download | llvm-12d5224df6df05dc1189788591c381f467f5ff25.tar.gz llvm-12d5224df6df05dc1189788591c381f467f5ff25.tar.bz2 llvm-12d5224df6df05dc1189788591c381f467f5ff25.tar.xz |
DIE: Pass ownership of children via std::unique_ptr rather than raw pointer.
This should reduce the chance of memory leaks like those fixed in
r207240.
There's still some unclear ownership of DIEs happening in DwarfDebug.
Pushing unique_ptr and references through more APIs should help expose
the cases where ownership is a bit fuzzy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207263 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 325e053029..9038c648af 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -367,7 +367,7 @@ class DwarfDebug : public AsmPrinterHandler { DIE *constructScopeDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope); /// A helper function to create children of a Scope DIE. DIE *createScopeChildrenDIE(DwarfCompileUnit &TheCU, LexicalScope *Scope, - SmallVectorImpl<DIE *> &Children); + SmallVectorImpl<std::unique_ptr<DIE>> &Children); /// \brief Emit initial Dwarf sections with a label at the start of each one. void emitSectionLabels(); |