diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 3d4dd69df3c3..81934e172977 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -542,8 +542,7 @@ DIE *DwarfDebug::constructInlinedScopeDIE(DwarfCompileUnit *TheCU, "Invalid starting label for an inlined scope!"); assert(EndLabel->isDefined() && "Invalid end label for an inlined scope!"); - TheCU->addLabelAddress(ScopeDIE, dwarf::DW_AT_low_pc, StartLabel); - TheCU->addLabelAddress(ScopeDIE, dwarf::DW_AT_high_pc, EndLabel); + attachLowHighPC(TheCU, ScopeDIE, StartLabel, EndLabel); } InlinedSubprogramDIEs.insert(OriginDIE); diff --git a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll index 021afd7a336c..c335084f7679 100644 --- a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll +++ b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll @@ -7,8 +7,9 @@ ;CHECK: DW_TAG_inlined_subroutine ;CHECK-NEXT: DW_AT_abstract_origin -;CHECK-NEXT: DW_AT_low_pc -;CHECK-NEXT: DW_AT_high_pc +;CHECK-NEXT: DW_AT_low_pc [DW_FORM_addr] +;DARWIN-NEXT: DW_AT_high_pc [DW_FORM_addr] +;LINUX-NEXT: DW_AT_high_pc [DW_FORM_data4] ;CHECK-NEXT: DW_AT_call_file ;CHECK-NEXT: DW_AT_call_line