summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2014-03-07 23:07:21 +0000
committerAdrian Prantl <aprantl@apple.com>2014-03-07 23:07:21 +0000
commitbd86fbe0d721aaa949d9a7be25fa7ae4d89972b7 (patch)
treedbc59552921d17a524ba00612f9f67c56081857c
parente373dfa8199f71c8a17ddf9dfb682f2ce522e140 (diff)
downloadllvm-bd86fbe0d721aaa949d9a7be25fa7ae4d89972b7.tar.gz
llvm-bd86fbe0d721aaa949d9a7be25fa7ae4d89972b7.tar.bz2
llvm-bd86fbe0d721aaa949d9a7be25fa7ae4d89972b7.tar.xz
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
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp2
-rw-r--r--test/DebugInfo/X86/dbg-value-inlined-parameter.ll3
-rw-r--r--test/DebugInfo/X86/dbg-value-location.ll18
3 files changed, 12 insertions, 11 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index dab3c194c1..17bb6857cd 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -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);
diff --git a/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
index c335084f76..3db67ffdc7 100644
--- a/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
+++ b/test/DebugInfo/X86/dbg-value-inlined-parameter.ll
@@ -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
diff --git a/test/DebugInfo/X86/dbg-value-location.ll b/test/DebugInfo/X86/dbg-value-location.ll
index 1e21c6a00a..a9449c6121 100644
--- a/test/DebugInfo/X86/dbg-value-location.ll
+++ b/test/DebugInfo/X86/dbg-value-location.ll
@@ -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