[llvm] 0b90a08 - [test][DebugInfo] Adapt two tests for Sun assembler syntax on Sparc
Rainer Orth via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 8 00:14:31 PDT 2020
Author: Rainer Orth
Date: 2020-08-08T09:13:47+02:00
New Revision: 0b90a08f7722980f6074c6eada8022242408cdb4
URL: https://github.com/llvm/llvm-project/commit/0b90a08f7722980f6074c6eada8022242408cdb4
DIFF: https://github.com/llvm/llvm-project/commit/0b90a08f7722980f6074c6eada8022242408cdb4.diff
LOG: [test][DebugInfo] Adapt two tests for Sun assembler syntax on Sparc
Two DebugInfo tests currently `FAIL` on Sparc:
LLVM :: DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
LLVM :: DebugInfo/Generic/array.ll
both in a similar way. E.g.
: 'RUN: at line 1'; /var/llvm/local-sparcv9-A/bin/llc -O2 /vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll -o - | /var/llvm/local-sparcv9-A/bin/FileCheck /vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
/vol/llvm/src/llvm-project/local/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll:4:10: error: CHECK: expected string not found in input
; CHECK: debug_info,
^
On `amd64-pc-solaris2.11`, the corresponding line is
.section .debug_info,"", at progbits
while on `sparcv9-sun-solaris2.11` we have only
.section .debug_info
This happens because Sparc currently emits `.section` directives using the
style of the Solaris/SPARC assembler (controlled by `SunStyleELFSectionSwitchSyntax`).
This patch takes the easy way out and allows both forms while tightening the
check to only match the `.section` directive.
Tested on `sparcv9-sun-solaris2.11`, `amd64-pc-solaris2.11`,
`x86_64-pc-linux-gnu`, and `x86_64-apple-darwin20.0.0`.
Differential Revision: https://reviews.llvm.org/D85414
Added:
Modified:
llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
llvm/test/DebugInfo/Generic/array.ll
Removed:
################################################################################
diff --git a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
index 795ebcc82bbb..b86261d938ce 100644
--- a/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
+++ b/llvm/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll
@@ -1,7 +1,7 @@
; RUN: %llc_dwarf -O2 %s -o - | FileCheck %s
; Check struct X for dead variable xyz from inlined function foo.
-; CHECK: debug_info,
+; CHECK: .section {{.*}}debug_info
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name
diff --git a/llvm/test/DebugInfo/Generic/array.ll b/llvm/test/DebugInfo/Generic/array.ll
index c3c592885184..06e55b20467f 100644
--- a/llvm/test/DebugInfo/Generic/array.ll
+++ b/llvm/test/DebugInfo/Generic/array.ll
@@ -25,7 +25,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
!7 = distinct !DILexicalBlock(line: 3, column: 12, file: !14, scope: !0)
!8 = !DICompositeType(tag: DW_TAG_array_type, align: 32, file: !14, scope: !2, baseType: !5, elements: !9)
!9 = !{!10}
-;CHECK: debug_info,
+;CHECK: .section {{.*}}debug_info
;CHECK: DW_TAG_subrange_type
;CHECK-NEXT: DW_AT_type
;CHECK-NOT: DW_AT_lower_bound
More information about the llvm-commits
mailing list