Skip to content

Commit 6d24291

Browse files
authored
[Clang, SystemZ] Split test into Driver and CodeGen parts (NFC) (#79808)
The test added in #73511 currently fails in CLANG_DEFAULT_PIE_ON_LINUX=OFF configuration, because it uses the clang driver in a codegen test. Split the test into two, a driver test that checks that the appropriate target feature is passed, and a codegen test that uses cc1.
1 parent 754a8ad commit 6d24291

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

clang/test/CodeGen/SystemZ/unaligned-symbols.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \
1+
// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \
22
// RUN: | FileCheck %s -check-prefixes=CHECK,ALIGNED
33

4-
// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \
5-
// RUN: -mno-unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED
4+
// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \
5+
// RUN: -target-feature -unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED
66

7-
// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \
8-
// RUN: -munaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN
9-
10-
// RUN: %clang -cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \
7+
// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \
118
// RUN: -target-feature +unaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN
129

1310

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %clang -target s390x-linux-gnu -### -c %s 2>&1 | FileCheck -check-prefix=DEFAULT %s
2+
// RUN: %clang -target s390x-linux-gnu -mno-unaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=ALIGNED %s
3+
// RUN: %clang -target s390x-linux-gnu -munaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=UNALIGN %s
4+
5+
// DEFAULT-NOT: unaligned-symbols"
6+
// ALIGNED: "-target-feature" "-unaligned-symbols"
7+
// UNALIGN: "-target-feature" "+unaligned-symbols"

0 commit comments

Comments
 (0)