[llvm] r189294 - Make the lifetime of the DICompileUnit we're constructing from the

Eric Christopher echristo at gmail.com
Mon Aug 26 16:57:03 PDT 2013


Author: echristo
Date: Mon Aug 26 18:57:03 2013
New Revision: 189294

URL: http://llvm.org/viewvc/llvm-project?rev=189294&view=rev
Log:
Make the lifetime of the DICompileUnit we're constructing from the
MDNode more clear as just for a single argument.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=189294&r1=189293&r2=189294&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Mon Aug 26 18:57:03 2013
@@ -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.





More information about the llvm-commits mailing list