summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-04-25 20:00:34 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-04-25 20:00:34 +0000
commit914046e1e7756aad8273f26302d39677648a3acf (patch)
treee78ee06f3935785439a15301c7ef4f161c702683 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
parente68b847fdb347f386e23ebd286dec115996440ee (diff)
downloadbcm5719-llvm-914046e1e7756aad8273f26302d39677648a3acf.tar.gz
bcm5719-llvm-914046e1e7756aad8273f26302d39677648a3acf.zip
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. llvm-svn: 207263
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 325e053029e..9038c648af3 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/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();
OpenPOWER on IntegriCloud