Author: Nikita Popov Date: 2024-01-29T14:53:48+01:00 New Revision: 6d242914d784ed848d0f87bf6df9b6b2f2b27566
URL: https://github.com/llvm/llvm-project/commit/6d242914d784ed848d0f87bf6df9b6b2f2b27566 DIFF: https://github.com/llvm/llvm-project/commit/6d242914d784ed848d0f87bf6df9b6b2f2b27566.diff LOG: [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. Added: clang/test/Driver/s390x-unaligned-symbols.c Modified: clang/test/CodeGen/SystemZ/unaligned-symbols.c Removed: ################################################################################ diff --git a/clang/test/CodeGen/SystemZ/unaligned-symbols.c b/clang/test/CodeGen/SystemZ/unaligned-symbols.c index 31fc211393dd71..b19f3033885799 100644 --- a/clang/test/CodeGen/SystemZ/unaligned-symbols.c +++ b/clang/test/CodeGen/SystemZ/unaligned-symbols.c @@ -1,13 +1,10 @@ -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ // RUN: | FileCheck %s -check-prefixes=CHECK,ALIGNED -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ -// RUN: -mno-unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ +// RUN: -target-feature -unaligned-symbols | FileCheck %s -check-prefixes=CHECK,ALIGNED -// RUN: %clang -target s390x-linux-gnu %s -o - -emit-llvm -S \ -// RUN: -munaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN - -// RUN: %clang -cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ +// RUN: %clang_cc1 -triple s390x-linux-gnu %s -o - -emit-llvm \ // RUN: -target-feature +unaligned-symbols | FileCheck %s -check-prefixes=CHECK,UNALIGN diff --git a/clang/test/Driver/s390x-unaligned-symbols.c b/clang/test/Driver/s390x-unaligned-symbols.c new file mode 100644 index 00000000000000..1dff5b737fff77 --- /dev/null +++ b/clang/test/Driver/s390x-unaligned-symbols.c @@ -0,0 +1,7 @@ +// RUN: %clang -target s390x-linux-gnu -### -c %s 2>&1 | FileCheck -check-prefix=DEFAULT %s +// RUN: %clang -target s390x-linux-gnu -mno-unaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=ALIGNED %s +// RUN: %clang -target s390x-linux-gnu -munaligned-symbols -### -c %s 2>&1 | FileCheck -check-prefix=UNALIGN %s + +// DEFAULT-NOT: unaligned-symbols" +// ALIGNED: "-target-feature" "-unaligned-symbols" +// UNALIGN: "-target-feature" "+unaligned-symbols" _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits