-CompileUnit::CompileUnit(unsigned UID, DIE *D, const MDNode *N, AsmPrinter *A,
- DwarfDebug *DW, DwarfUnits *DWU)
- : UniqueID(UID), Node(N), CUDie(D), Asm(A), DD(DW), DU(DWU), IndexTyDie(0),
- DebugInfoOffset(0) {
+CompileUnit::CompileUnit(unsigned UID, DIE *D, DICompileUnit Node,
+ AsmPrinter *A, DwarfDebug *DW, DwarfUnits *DWU)
+ : UniqueID(UID), Node(Node), Language(Node.getLanguage()), CUDie(D),
+ DebugInfoOffset(0), Asm(A), DD(DW), DU(DWU), IndexTyDie(0) {
+ DIEIntegerOne = new (DIEValueAllocator) DIEInteger(1);
+ insertDIE(Node, D);
+}
+
+CompileUnit::CompileUnit(unsigned UID, DIE *D, uint16_t Language, AsmPrinter *A,
+ DwarfDebug *DD, DwarfUnits *DU)
+ : UniqueID(UID), Node(NULL), Language(Language), CUDie(D),
+ DebugInfoOffset(0), Asm(A), DD(DD), DU(DU), IndexTyDie(0) {