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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209677 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2014-05-27 18:37:55 +00:00
parent 0fb9226470
commit 41087d99df
5 changed files with 62 additions and 66 deletions

View File

@@ -25,9 +25,11 @@
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_type [DW_FORM_ref_addr] (0x00000000[[INT:.*]])
; CHECK: DW_TAG_inlined_subroutine
; CHECK-NEXT: DW_AT_abstract_origin {{.*}}[[ABS_FUNC:........]])
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}}[[ABS_FUNC:........]])
; CHECK: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_abstract_origin {{.*}}[[ABS_VAR:........]])
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}}[[ABS_VAR:........]])
; Check the abstract definition is in the 'b.cpp' CU and doesn't contain any
; concrete information (address range or variable location)
@@ -48,10 +50,13 @@
; Check the concrete out of line definition references the abstract and
; provides the address range and variable location
; CHECK: DW_TAG_subprogram
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {0x[[ABS_FUNC]]}
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_low_pc
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}} {0x[[ABS_FUNC]]}
; CHECK: DW_TAG_formal_parameter
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} {0x[[ABS_VAR]]}
; CHECK-NOT: DW_TAG
; CHECK: DW_AT_abstract_origin {{.*}} {0x[[ABS_VAR]]}
; CHECK: DW_AT_location