Remove unnecessary test for Darwin and update testcase to be a little less

horrible/fragile.
rdar://problem/16264854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203309 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adrian Prantl 2014-03-07 23:07:21 +00:00
parent e373dfa819
commit bd86fbe0d7
3 changed files with 12 additions and 11 deletions

View File

@ -2845,7 +2845,7 @@ void DwarfDebug::addDwarfTypeUnitType(DwarfCompileUnit &CU,
void DwarfDebug::attachLowHighPC(DwarfCompileUnit *Unit, DIE *D,
MCSymbol *Begin, MCSymbol *End) {
Unit->addLabelAddress(D, dwarf::DW_AT_low_pc, Begin);
if (DwarfVersion < 4 || Triple(Asm->getTargetTriple()).isOSDarwin())
if (DwarfVersion < 4)
Unit->addLabelAddress(D, dwarf::DW_AT_high_pc, End);
else
Unit->addLabelDelta(D, dwarf::DW_AT_high_pc, End, Begin);

View File

@ -8,8 +8,7 @@
;CHECK: DW_TAG_inlined_subroutine
;CHECK-NEXT: DW_AT_abstract_origin
;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_high_pc [DW_FORM_data4]
;CHECK-NEXT: DW_AT_call_file
;CHECK-NEXT: DW_AT_call_line

View File

@ -1,14 +1,16 @@
; RUN: llc < %s | FileCheck %s
; RUN: llc < %s -regalloc=basic | FileCheck %s
; RUN: llc -filetype=obj %s -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s
; RUN: llc -filetype=obj %s -regalloc=basic -o - | llvm-dwarfdump -debug-dump=info - | FileCheck %s
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
target triple = "x86_64-apple-darwin10.0.0"
;Radar 8950491
; Test that the type for the formal parameter "var" makes it into the debug info.
; rdar://8950491
;CHECK: .long Lset5
;CHECK-NEXT: ## DW_AT_decl_file
;CHECK-NEXT: ## DW_AT_decl_line
;CHECK-NEXT: ## DW_AT_type
;CHECK-NEXT: ## DW_AT_location
;CHECK: DW_TAG_formal_parameter
;CHECK-NEXT: DW_AT_name {{.*}} "var"
;CHECK-NEXT: DW_AT_decl_file
;CHECK-NEXT: DW_AT_decl_line
;CHECK-NEXT: DW_AT_type
;CHECK-NEXT: DW_AT_location
@dfm = external global i32, align 4