From: Eric Christopher Date: Mon, 26 Aug 2013 23:57:03 +0000 (+0000) Subject: Make the lifetime of the DICompileUnit we're constructing from the X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=30410d5993f3c99da9102ccf6f78a63f9f64f252;p=oota-llvm.git Make the lifetime of the DICompileUnit we're constructing from the MDNode more clear as just for a single argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189294 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 0dba9717c91..6006f280931 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2686,14 +2686,13 @@ void DwarfDebug::emitDebugInlineInfo() { // DW_AT_ranges_base, DW_AT_addr_base. If DW_AT_ranges is present, // DW_AT_low_pc and DW_AT_high_pc are not used, and vice versa. CompileUnit *DwarfDebug::constructSkeletonCU(const CompileUnit *CU) { - DICompileUnit DIUnit(CU->getNode()); DIE *Die = new DIE(dwarf::DW_TAG_compile_unit); CompileUnit *NewCU = new CompileUnit(CU->getUniqueID(), Die, CU->getNode(), Asm, this, &SkeletonHolder); NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name, - DIUnit.getSplitDebugFilename()); + DICompileUnit(CU->getNode()).getSplitDebugFilename()); // Relocate to the beginning of the addr_base section, else 0 for the // beginning of the one for this compile unit.