Remove unnecessary test for Darwin and update testcase to be a little less
authorAdrian Prantl <aprantl@apple.com>
Fri, 7 Mar 2014 23:07:21 +0000 (23:07 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 7 Mar 2014 23:07:21 +0000 (23:07 +0000)
horrible/fragile.
rdar://problem/16264854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/AsmPrinter/DwarfDebug.cpp
test/DebugInfo/X86/dbg-value-inlined-parameter.ll
test/DebugInfo/X86/dbg-value-location.ll

index dab3c194c1e43596372994468f1b5b2c21f993c6..17bb6857cdc926915419a541e0e48f099e8b38fd 100644 (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);
 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);
     Unit->addLabelAddress(D, dwarf::DW_AT_high_pc, End);
   else
     Unit->addLabelDelta(D, dwarf::DW_AT_high_pc, End, Begin);
index c335084f7679633dbed9789967d312a74cbe1d27..3db67ffdc7a4ab63f6ae1d9038116cbb520d22d8 100644 (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]
 ;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
 
 ;CHECK-NEXT: DW_AT_call_file
 ;CHECK-NEXT: DW_AT_call_line
 
index 1e21c6a00ae4aae0f4034468e6f63e27a54fb009..a9449c6121fb2bd5485f68556c4f806c4cbed989 100644 (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"
 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
 
 
 @dfm = external global i32, align 4