Skip to content

Commit d59ce7d

Browse files
committed
[ARM] Specify Triple in DebugInfo Tests
When the host's target triple ends in `-windows-msvc`, `%llc_dwarf` contains an explicit `-windows-gnu` triple which ensures that dwarf will be used. This is useful in target-independent tests, where no triple is specified, and no target-specific features are used. However, this is not compatible with target-dependent tests (such as those in llvm/test/DebugInfo/ARM), as the command-line triple will override the triple in the LLVM IR program, causing test issues on windows. This change switches these tests to use an explicit triple, so the tests test what was expected, and there is no flakiness on windows. Fixes llvm#58053 Differential Revision: https://reviews.llvm.org/D136066
1 parent 0933b8c commit d59ce7d

File tree

3 files changed

+4
-13
lines changed

3 files changed

+4
-13
lines changed

llvm/test/DebugInfo/ARM/bitfield.ll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
1+
; RUN: llc -mtriple=thumbv7-apple-ios -O0 -filetype=obj -o %t.o %s
22
; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
33
;
44
; Generated from:
@@ -14,9 +14,6 @@
1414
; CHECK: DW_AT_bit_size {{.*}} (0x1c)
1515
; CHECK: DW_AT_bit_offset {{.*}} (0xfffffffffffffff8)
1616
; CHECK: DW_AT_data_member_location {{.*}} (DW_OP_plus_uconst 0x0)
17-
source_filename = "test/DebugInfo/ARM/bitfield.ll"
18-
target datalayout = "e-m:o-p:32:32-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32"
19-
target triple = "thumbv7-apple-ios"
2017

2118
%struct.anon = type { i8, [5 x i8] }
2219

llvm/test/DebugInfo/ARM/float-args.ll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
; RUN: %llc_dwarf -filetype=obj -mattr=+vfp2 -float-abi=hard < %s | llvm-dwarfdump -debug-info - | FileCheck %s
2-
; RUN: %llc_dwarf -filetype=obj -mattr=-vfp2 -float-abi=soft < %s | llvm-dwarfdump -debug-info - | FileCheck %s
1+
; RUN: llc -mtriple=armv7--none-eabi -filetype=obj -mattr=+vfp2 -float-abi=hard < %s | llvm-dwarfdump -debug-info - | FileCheck %s
2+
; RUN: llc -mtriple=armv7--none-eabi -filetype=obj -mattr=-vfp2 -float-abi=soft < %s | llvm-dwarfdump -debug-info - | FileCheck %s
33

44
; Generated by clang -O1 -g from the following C source:
55
; float foo(float p) {
@@ -12,9 +12,6 @@
1212
; CHECK: 0x{{[0-9a-f]*}}: DW_TAG_formal_parameter
1313
; CHECK-NEXT: DW_AT_location
1414

15-
target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
16-
target triple = "armv7--none-eabi"
17-
1815
define float @foo(float %p) !dbg !4 {
1916
entry:
2017
tail call void @llvm.dbg.value(metadata float %p, metadata !9, metadata !15), !dbg !16

llvm/test/DebugInfo/ARM/split-complex.ll

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
; XFAIL: aarch64-pc-windows-msvc
2-
; RUN: %llc_dwarf -O0 -filetype=obj -o %t.o %s
1+
; RUN: llc -mtriple=thumbv7-apple-unknown-macho -O0 -filetype=obj -o %t.o %s
32
; RUN: llvm-dwarfdump -v -debug-info %t.o | FileCheck %s
4-
target datalayout = "e-m:o-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
5-
target triple = "thumbv7-apple-unknown-macho"
63

74
; generated from (-triple thumbv7-apple-unknown-macho -Os):
85
; void f(_Complex double c) { c = 0; }

0 commit comments

Comments
 (0)