mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
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
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user