DwarfCompileUnit: Add type safety to CompileUnit::getNode by returning DICompileUnit...
[oota-llvm.git] / lib / CodeGen / AsmPrinter / DwarfDebug.cpp
index ff0d43b3d1e112868c9d382a73200d75705b7085..f8b2609396479d50c26cec9cfa78422fda31f977 100644 (file)
@@ -2950,12 +2950,11 @@ void DwarfDebug::emitDebugMacInfo() {
 CompileUnit *DwarfDebug::constructSkeletonCU(const CompileUnit *CU) {
 
   DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
-  CompileUnit *NewCU =
-      new CompileUnit(CU->getUniqueID(), Die, DICompileUnit(CU->getNode()), Asm,
-                      this, &SkeletonHolder);
+  CompileUnit *NewCU = new CompileUnit(CU->getUniqueID(), Die, CU->getNode(),
+                                       Asm, this, &SkeletonHolder);
 
   NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
-                        DICompileUnit(CU->getNode()).getSplitDebugFilename());
+                        CU->getNode().getSplitDebugFilename());
 
   // Relocate to the beginning of the addr_base section, else 0 for the
   // beginning of the one for this compile unit.