diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-05-27 18:37:55 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-05-27 18:37:55 +0000 |
| commit | 482097d0981642624a727ba83b4926082f44982f (patch) | |
| tree | 9644e8248162c1a153e292871c5076c2d410a3b8 /llvm/test/DebugInfo/X86 | |
| parent | 2910f6208463948a77d48dc1021446a27be96e4a (diff) | |
| download | bcm5719-llvm-482097d0981642624a727ba83b4926082f44982f.tar.gz bcm5719-llvm-482097d0981642624a727ba83b4926082f44982f.zip | |
DebugInfo: Create abstract function definitions even when concrete definitions preceed inline definitions.
After much puppetry, here's the major piece of the work to ensure that
even when a concrete definition preceeds all inline definitions, an
abstract definition is still created and referenced from both concrete
and inline definitions.
Variables are still broken in this case (see comment in
dbg-value-inlined-parameter.ll test case) and will be addressed in
follow up work.
llvm-svn: 209677
Diffstat (limited to 'llvm/test/DebugInfo/X86')
| -rw-r--r-- | llvm/test/DebugInfo/X86/concrete_out_of_line.ll | 10 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll | 21 |
2 files changed, 18 insertions, 13 deletions
diff --git a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll index 5d9f6a5779b..40300de793d 100644 --- a/llvm/test/DebugInfo/X86/concrete_out_of_line.ll +++ b/llvm/test/DebugInfo/X86/concrete_out_of_line.ll @@ -15,15 +15,15 @@ ; CHECK: [[DTOR_DECL:0x........]]: DW_TAG_subprogram ; CHECK: [[D2_ABS:.*]]: DW_TAG_subprogram -; CHECK-NEXT: DW_AT_inline ; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D2 ; CHECK-NEXT: DW_AT_specification {{.*}} {[[DTOR_DECL]]} +; CHECK-NEXT: DW_AT_inline ; CHECK-NOT: DW_AT ; CHECK: DW_TAG ; CHECK: [[D1_ABS:.*]]: DW_TAG_subprogram -; CHECK-NEXT: DW_AT_inline ; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D1 ; CHECK-NEXT: DW_AT_specification {{.*}} {[[DTOR_DECL]]} +; CHECK-NEXT: DW_AT_inline ; CHECK-NOT: DW_AT ; CHECK: [[D1_THIS_ABS:.*]]: DW_TAG_formal_parameter @@ -49,9 +49,11 @@ ; and then that a TAG_subprogram refers to it with AT_abstract_origin. ; CHECK: DW_TAG_subprogram -; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {[[D1_ABS]]} +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_ABS]]} ; CHECK: DW_TAG_formal_parameter -; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]} +; CHECK-NOT: DW_TAG +; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]} ; CHECK: DW_TAG_inlined_subroutine ; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {[[D2_ABS]]} diff --git a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll index 74b2f8bc338..1922272cab9 100644 --- a/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll +++ b/llvm/test/DebugInfo/X86/dbg-value-inlined-parameter.ll @@ -5,12 +5,16 @@ ; RUN: llc -mtriple=x86_64-apple-darwin < %s -filetype=obj -regalloc=basic \ ; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s -; FIXME: This is both a concrete and abstract definition, which is -; incorrect. They should be separate -; CHECK: [[ABS:.*]]: DW_TAG_subprogram -; CHECK-NOT: DW_TAG -; CHECK: DW_AT_high_pc -; CHECK-NOT: DW_TAG +; CHECK: DW_TAG_subprogram +; CHECK: DW_AT_abstract_origin {{.*}}{[[ABS:.*]]} +; FIXME: An out of line definition preceeding an inline usage doesn't properly +; reference abstract variables. +; CHECK: DW_TAG_formal_parameter +; CHECK-NEXT: DW_AT_name {{.*}} "sp" +; CHECK: DW_TAG_formal_parameter +; CHECK-NEXT: DW_AT_name {{.*}} "nums" + +; CHECK: [[ABS]]: DW_TAG_subprogram ; CHECK: DW_AT_name {{.*}} "foo" ; CHECK: [[ABS_SP:.*]]: DW_TAG_formal_parameter ; CHECK-NEXT: DW_AT_name {{.*}} "sp" @@ -26,10 +30,9 @@ ;CHECK: DW_TAG_formal_parameter ;FIXME: Linux shouldn't drop this parameter either... -;FIXME: These parameters should have DW_AT_abstract_origin, instead of names. -;DARWIN-NEXT: DW_AT_name {{.*}} "sp" +;DARWIN-NEXT: DW_AT_abstract_origin {{.*}}{[[ABS_SP]]} ;DARWIN: DW_TAG_formal_parameter -;CHECK-NEXT: DW_AT_name {{.*}} "nums" +;CHECK-NEXT: DW_AT_abstract_origin {{.*}}{[[ABS_NUMS]]} ;CHECK-NOT: DW_TAG_formal_parameter %struct.S1 = type { float*, i32 } |

