Skip to content

Commit 6b16b43

Browse files
committed
Make the lifetime of the DICompileUnit we're constructing from the
MDNode more clear as just for a single argument. llvm-svn: 189294
1 parent 6fdf324 commit 6b16b43

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,14 +2686,13 @@ void DwarfDebug::emitDebugInlineInfo() {
26862686
// DW_AT_ranges_base, DW_AT_addr_base. If DW_AT_ranges is present,
26872687
// DW_AT_low_pc and DW_AT_high_pc are not used, and vice versa.
26882688
CompileUnit *DwarfDebug::constructSkeletonCU(const CompileUnit *CU) {
2689-
DICompileUnit DIUnit(CU->getNode());
26902689

26912690
DIE *Die = new DIE(dwarf::DW_TAG_compile_unit);
26922691
CompileUnit *NewCU = new CompileUnit(CU->getUniqueID(), Die, CU->getNode(),
26932692
Asm, this, &SkeletonHolder);
26942693

26952694
NewCU->addLocalString(Die, dwarf::DW_AT_GNU_dwo_name,
2696-
DIUnit.getSplitDebugFilename());
2695+
DICompileUnit(CU->getNode()).getSplitDebugFilename());
26972696

26982697
// Relocate to the beginning of the addr_base section, else 0 for the
26992698
// beginning of the one for this compile unit.

0 commit comments

Comments
 (0)