Use std::unique_ptr for DIE children

Got bored, removed some manual memory management.

Pushed references (rather than pointers) through a few APIs rather than
replacing *x with x.get().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-04-14 22:45:02 +00:00
parent fdf3f439eb
commit 40352669ba
5 changed files with 31 additions and 43 deletions

View File

@@ -178,7 +178,7 @@ public:
const SmallVectorImpl<DwarfUnit *> &getUnits() { return CUs; }
/// \brief Compute the size and offset of a DIE given an incoming Offset.
unsigned computeSizeAndOffset(DIE *Die, unsigned Offset);
unsigned computeSizeAndOffset(DIE &Die, unsigned Offset);
/// \brief Compute the size and offset of all the DIEs.
void computeSizeAndOffsets();
@@ -666,7 +666,7 @@ public:
}
/// \brief Recursively Emits a debug information entry.
void emitDIE(DIE *Die);
void emitDIE(DIE &Die);
// Experimental DWARF5 features.