From 9623e46f003b640b8793d948a46175eda10b5af5 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 7 Mar 2014 22:00:56 +0000 Subject: [PATCH] DebugInfo: Use DW_FORM_data4 for DW_AT_high_pc in inlined functions Suggested by Adrian Prantl in code review for r203187. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203296 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 3 +-- test/DebugInfo/X86/dbg-value-inlined-parameter.ll | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 3d4dd69df3c..81934e17297 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/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/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/test/DebugInfo/X86/dbg-value-inlined-parameter.ll index 021afd7a336..c335084f767 100644 --- a/test/DebugInfo/X86/dbg-value-inlined-parameter.ll +++ b/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