diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-05-23 21:11:46 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-05-23 21:11:46 +0000 |
commit | 2f75351c02a32592f5c0f2af3a2ab10cf12cdb07 (patch) | |
tree | b5fc91e71c12d36f902aa08d3463742612fe5dff /llvm/test/DebugInfo/SystemZ/variable-loc.ll | |
parent | 71ed20f67198c06039b6f9419318ecfbf83eb51d (diff) | |
download | bcm5719-llvm-2f75351c02a32592f5c0f2af3a2ab10cf12cdb07.tar.gz bcm5719-llvm-2f75351c02a32592f5c0f2af3a2ab10cf12cdb07.zip |
DebugInfo: Generalize some tests to handle variations in attribute ordering.
In an effort to fix inlined debug info in situations where the out of
line definition of a function preceeds any inlined usage, the order in
which some attributes are added to subprogram DIEs may change. (in
essence, definition-necessary attributes like DW_AT_low_pc/high_pc will
be added immediately, but the names, types, and other features will be
delayed to module end where they may either be added to the subprogram
DIE or instead reference an abstract definition for those values)
These tests can be generalized to be resilient to this change. 5 or so
tests actually have to be incompatibly changed to cope with this
reordering and will go along with the change that affects the order.
llvm-svn: 209554
Diffstat (limited to 'llvm/test/DebugInfo/SystemZ/variable-loc.ll')
-rw-r--r-- | llvm/test/DebugInfo/SystemZ/variable-loc.ll | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/llvm/test/DebugInfo/SystemZ/variable-loc.ll b/llvm/test/DebugInfo/SystemZ/variable-loc.ll index 2d92fd9edcc..e0e4156d395 100644 --- a/llvm/test/DebugInfo/SystemZ/variable-loc.ll +++ b/llvm/test/DebugInfo/SystemZ/variable-loc.ll @@ -1,4 +1,6 @@ ; RUN: llc -mtriple=s390x-linux-gnu -disable-fp-elim < %s | FileCheck %s +; RUN: llc -mtriple=s390x-linux-gnu -disable-fp-elim -filetype=obj < %s \ +; RUN: | llvm-dwarfdump -debug-dump=info - | FileCheck --check-prefix=DEBUG %s ; ; This is a regression test making sure the location of variables is correct in ; debugging information, even if they're addressed via the frame pointer. @@ -10,20 +12,13 @@ ; CHECK: aghi %r15, -568 ; CHECK: la %r2, 164(%r11) ; CHECK: brasl %r14, populate_array@PLT -; -; CHECK: .Linfo_string7: -; CHECK-NEXT: main_arr -; -; Now check that the debugging information reflects this: -; CHECK: DW_TAG_variable -; CHECK-NEXT: .long .Linfo_string7 -; -; Rather hard-coded, but 145 => DW_OP_fbreg and the .ascii is the sleb128 -; encoding of 164: -; CHECK: DW_AT_location -; CHECK-NEXT: .byte 145 -; CHECK-NEXT: .ascii "\244\001" -; + +; DEBUG: DW_TAG_variable +; DEBUG-NOT: DW_TAG +; DEBUG: DW_AT_name {{.*}} "main_arr" +; Rather hard-coded, but 0x91 => DW_OP_fbreg and 0xa401 is SLEB128 encoded 164. +; DEBUG-NOT: DW_TAG +; DEBUG: DW_AT_location {{.*}}(<0x3> 91 a4 01 ) @.str = private unnamed_addr constant [13 x i8] c"Total is %d\0A\00", align 2 |