diff options
author | Eric Christopher <echristo@gmail.com> | 2013-08-27 23:49:04 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-08-27 23:49:04 +0000 |
commit | 7b2ee399d9c1b2112962d29540c25b94fa98e8ed (patch) | |
tree | 091e20b1a9eaba3b3e303bd61158a9328ecdfcbf /test | |
parent | 6e74bfc0e6b7ab56c15ca5b6444a1ff83ff60709 (diff) | |
download | external_llvm-7b2ee399d9c1b2112962d29540c25b94fa98e8ed.zip external_llvm-7b2ee399d9c1b2112962d29540c25b94fa98e8ed.tar.gz external_llvm-7b2ee399d9c1b2112962d29540c25b94fa98e8ed.tar.bz2 |
Use DW_FORM_sdata for signed constant values and udata on occasion
when we can. Migrate from using blocks when we're adding just a
single attribute and floating point values are an unsigned, not signed,
bag of bits.
Update all test cases accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/DebugInfo/X86/dbg-const-int.ll | 8 | ||||
-rw-r--r-- | test/DebugInfo/X86/debug-info-static-member.ll | 4 | ||||
-rw-r--r-- | test/DebugInfo/X86/multiple-at-const-val.ll | 2 | ||||
-rw-r--r-- | test/DebugInfo/X86/template.ll | 6 |
4 files changed, 12 insertions, 8 deletions
diff --git a/test/DebugInfo/X86/dbg-const-int.ll b/test/DebugInfo/X86/dbg-const-int.ll index 4ff0301..7b6c40c 100644 --- a/test/DebugInfo/X86/dbg-const-int.ll +++ b/test/DebugInfo/X86/dbg-const-int.ll @@ -1,9 +1,13 @@ -; RUN: llc < %s - | FileCheck %s +; RUN: llc -mtriple=x86_64-apple-darwin12 -filetype=obj %s -o %t +; RUN: llvm-dwarfdump %t | 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-macosx10.6.7" ; Radar 9511391 -;CHECK: .byte 4 ## DW_AT_const_value +; CHECK: DW_TAG_variable +; CHECK: "i" +; CHECK: DW_AT_const_value [DW_FORM_sdata] (42) + define i32 @foo() nounwind uwtable readnone optsize ssp { entry: tail call void @llvm.dbg.value(metadata !8, i64 0, metadata !6), !dbg !9 diff --git a/test/DebugInfo/X86/debug-info-static-member.ll b/test/DebugInfo/X86/debug-info-static-member.ll index cda725a..4378115 100644 --- a/test/DebugInfo/X86/debug-info-static-member.ll +++ b/test/DebugInfo/X86/debug-info-static-member.ll @@ -120,7 +120,7 @@ declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone ; PRESENT: DW_TAG_member ; PRESENT-NEXT: DW_AT_name {{.*}} "const_c" ; PRESENT: DW_AT_accessibility [DW_FORM_data1] (0x01) -; PRESENT: DW_AT_const_value {{.*}} (0x00000012) +; PRESENT: DW_AT_const_value {{.*}} (18) ; While we're here, a normal member has data_member_location and ; accessibility attributes. ; PRESENT: DW_TAG_member @@ -173,7 +173,7 @@ declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone ; DARWINP: DW_TAG_member ; DARWINP-NEXT: DW_AT_name {{.*}} "const_c" ; DARWINP: DW_AT_accessibility [DW_FORM_data1] (0x01) -; DARWINP: DW_AT_const_value {{.*}} (0x00000012) +; DARWINP: DW_AT_const_value {{.*}} (18) ; While we're here, a normal member has data_member_location and ; accessibility attributes. ; DARWINP: DW_TAG_member diff --git a/test/DebugInfo/X86/multiple-at-const-val.ll b/test/DebugInfo/X86/multiple-at-const-val.ll index 13fa48b..e966fc0 100644 --- a/test/DebugInfo/X86/multiple-at-const-val.ll +++ b/test/DebugInfo/X86/multiple-at-const-val.ll @@ -8,7 +8,7 @@ ; CHECK: DW_TAG_class_type ; CHECK: DW_TAG_member ; CHECK: badbit -; CHECK: DW_AT_const_value [DW_FORM_data4] (0x00000001) +; CHECK: DW_AT_const_value [DW_FORM_sdata] (1) ; CHECK-NOT: DW_AT_const_value ; CHECK: NULL diff --git a/test/DebugInfo/X86/template.ll b/test/DebugInfo/X86/template.ll index 16808e1..e7aff79 100644 --- a/test/DebugInfo/X86/template.ll +++ b/test/DebugInfo/X86/template.ll @@ -27,7 +27,7 @@ ; even as data1. DWARF strongly urges implementations to prefer ; _sdata/_udata rather than dataN -; CHECK-NEXT: DW_AT_const_value [DW_FORM_data4]{{.*}}(0x00000003) +; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(3) ; CHECK: DW_TAG_template_value_parameter ; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INTPTR:0x[0-9a-f]*]]} @@ -47,11 +47,11 @@ ; CHECK-NOT: NULL ; CHECK: DW_TAG_template_value_parameter ; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]} -; CHECK-NEXT: DW_AT_const_value [DW_FORM_data4]{{.*}}(0x00000001) +; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(1) ; CHECK-NOT: NULL ; CHECK: DW_TAG_template_value_parameter ; CHECK-NEXT: DW_AT_type{{.*}}=> {[[INT]]} -; CHECK-NEXT: DW_AT_const_value [DW_FORM_data4]{{.*}}(0x00000002) +; CHECK-NEXT: DW_AT_const_value [DW_FORM_sdata]{{.*}}(2) ; CHECK: [[INTPTR]]:{{ *}}DW_TAG_pointer_type ; CHECK-NEXT: DW_AT_type{{.*}} => {[[INT]]} |