Pass the MDNode in and do the insertion at compile unit creation time

instead of relying upon an extra call to finish initializing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181383 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2013-05-08 00:58:51 +00:00
parent 1db3d0820f
commit 9c57ad2381
3 changed files with 7 additions and 7 deletions

View File

@ -32,11 +32,12 @@
using namespace llvm;
/// CompileUnit - Compile unit constructor.
CompileUnit::CompileUnit(unsigned UID, unsigned L, DIE *D, AsmPrinter *A,
DwarfDebug *DW, DwarfUnits *DWU)
CompileUnit::CompileUnit(unsigned UID, unsigned L, DIE *D, const MDNode *N,
AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU)
: UniqueID(UID), Language(L), CUDie(D), Asm(A), DD(DW), DU(DWU),
IndexTyDie(0), DebugInfoOffset(0) {
DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
insertDIE(N, D);
}
/// ~CompileUnit - Destructor for compile unit.