[clang] [lld] [llvm] Test: Fix tests for normalization of triple XXX-none-ABI. NFC (PR #90313)

via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 26 22:19:37 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-driver

@llvm/pr-subscribers-clang

Author: YunQiang Su (wzssyqa)

<details>
<summary>Changes</summary>

https://discourse.llvm.org/t/rfc-baremetal-target-triple-normalization/78524

See: PR#<!-- -->89638.

---

Patch is 40.61 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/90313.diff


35 Files Affected:

- (modified) clang/test/CodeGen/Inputs/linker-diagnostic1.ll (+1-1) 
- (modified) clang/test/CodeGen/linker-diagnostic.ll (+2-2) 
- (modified) clang/test/Driver/arm-ias-Wa.s (+1-1) 
- (modified) clang/test/Driver/arm-triple.c (+5-5) 
- (modified) clang/test/Driver/baremetal-multilib-exclusive-group.yaml (+11-11) 
- (modified) clang/test/Driver/baremetal-multilib-group-error.yaml (+2-2) 
- (modified) clang/test/Driver/baremetal-multilib-layered.yaml (+1-1) 
- (modified) clang/test/Driver/baremetal-multilib.yaml (+32-32) 
- (modified) clang/test/Driver/baremetal-sysroot.cpp (+1-1) 
- (modified) clang/test/Driver/baremetal.cpp (+1-1) 
- (modified) clang/test/Driver/print-multi-selection-flags.c (+7-7) 
- (modified) clang/test/Preprocessor/init-arm.c (+2-2) 
- (modified) clang/unittests/Driver/MultilibTest.cpp (+26-26) 
- (modified) clang/unittests/Interpreter/IncrementalCompilerBuilderTest.cpp (+1-1) 
- (modified) lld/test/ELF/lto/arm.ll (+2-2) 
- (modified) llvm/test/CodeGen/ARM/machine-sink-multidef.mir (+1-1) 
- (modified) llvm/test/CodeGen/ARM/store-prepostinc.mir (+1-1) 
- (modified) llvm/test/CodeGen/ARM/unschedule-reg-sequence.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/consthoist-few-dependents.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/consthoist-imm8-costs-1.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/pr42760.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/smul_fix.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/smul_fix_sat.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/umul_fix.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb/umul_fix_sat.ll (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/LowOverheadLoops/spillingmove.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/LowOverheadLoops/wls-search-pred.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/high-reg-spill.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/mve-pred-constfold.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/mve-vpt-block-debug.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/pipeliner-preserve-ties.mir (+1-1) 
- (modified) llvm/test/CodeGen/Thumb2/store-prepostinc.mir (+1-1) 
- (modified) llvm/test/Transforms/InferFunctionAttrs/norecurse_debug.ll (+1-1) 
- (modified) llvm/test/Transforms/LoopVectorize/ARM/mve-hoist-runtime-checks.ll (+1-1) 
- (modified) llvm/unittests/TargetParser/TripleTest.cpp (+1-1) 


``````````diff
diff --git a/clang/test/CodeGen/Inputs/linker-diagnostic1.ll b/clang/test/CodeGen/Inputs/linker-diagnostic1.ll
index 913dbefe5ccec9..96883aa26cffed 100644
--- a/clang/test/CodeGen/Inputs/linker-diagnostic1.ll
+++ b/clang/test/CodeGen/Inputs/linker-diagnostic1.ll
@@ -1,4 +1,4 @@
-target triple = "armv4-none-unknown-eabi"
+target triple = "armv4-unknown-none-eabi"
 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
 
 declare i32 @foo(i32)
diff --git a/clang/test/CodeGen/linker-diagnostic.ll b/clang/test/CodeGen/linker-diagnostic.ll
index c8406314f8d6fd..009819b464fe50 100644
--- a/clang/test/CodeGen/linker-diagnostic.ll
+++ b/clang/test/CodeGen/linker-diagnostic.ll
@@ -4,10 +4,10 @@
 ; RUN: opt -module-summary -o %t/bar.o %S/Inputs/linker-diagnostic1.ll
 ; RUN: llvm-lto2 run --thinlto-distributed-indexes -r %t/foo.o,foo,plx -r %t/bar.o,bar,plx \
 ; RUN:   -r %t/bar.o,foo, -o %t/foobar.so %t/foo.o %t/bar.o
-; RUN: %clang -c -o %t/lto.bar.o --target=armv4-none-unknown-eabi -O2 \
+; RUN: %clang -c -o %t/lto.bar.o --target=armv4-unknown-none-eabi -O2 \
 ; RUN:   -fthinlto-index=%t/bar.o.thinlto.bc %t/bar.o -Wno-override-module 2>&1 | FileCheck %s
 
-; CHECK: linking module '{{.*}}/bar.o': Linking two modules of different target triples: '{{.*}}/foo.o' is 'thumbv6-unknown-linux-gnueabihf' whereas '{{.*}}/bar.o' is 'armv4-none-unknown-eabi'
+; CHECK: linking module '{{.*}}/bar.o': Linking two modules of different target triples: '{{.*}}/foo.o' is 'thumbv6-unknown-linux-gnueabihf' whereas '{{.*}}/bar.o' is 'armv4-unknown-none-eabi'
 
 target triple = "thumbv6-unknown-linux-gnueabihf"
 target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
diff --git a/clang/test/Driver/arm-ias-Wa.s b/clang/test/Driver/arm-ias-Wa.s
index b82ce8dfb31ab3..5e9518ed2dc423 100644
--- a/clang/test/Driver/arm-ias-Wa.s
+++ b/clang/test/Driver/arm-ias-Wa.s
@@ -71,7 +71,7 @@
 
 // RUN: %clang -target armv7r-none-eabi -c %s -### 2>&1 \
 // RUN:   | FileCheck -check-prefix=CHECK-R-PROFILE %s
-// CHECK-R-PROFILE: "-triple" "armv7r-none-unknown-eabi"
+// CHECK-R-PROFILE: "-triple" "armv7r-unknown-none-eabi"
 
 // RUN: %clang -target armv7m-none-eabi -c %s -### 2>&1 \
 // RUN: %clang -target thumbv7m-none-eabi -c %s -### 2>&1 \
diff --git a/clang/test/Driver/arm-triple.c b/clang/test/Driver/arm-triple.c
index fa9f7b189c8278..1fb2b5afe22a51 100644
--- a/clang/test/Driver/arm-triple.c
+++ b/clang/test/Driver/arm-triple.c
@@ -7,7 +7,7 @@
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabihf -march=armv4t -mfloat-abi=softfp \
 // RUN:   | FileCheck %s --check-prefix=CHECK-DEFAULT
-// CHECK-DEFAULT: armv4t-none-unknown-eabi
+// CHECK-DEFAULT: armv4t-unknown-none-eabi
 
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=armeb-none-eabi \
@@ -15,7 +15,7 @@
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabi -mbig-endian \
 // RUN:   | FileCheck %s --check-prefix=CHECK-EB
-// CHECK-EB: armebv4t-none-unknown-eabi
+// CHECK-EB: armebv4t-unknown-none-eabi
 
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabihf -march=armv4t \
@@ -23,7 +23,7 @@
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabi -mfloat-abi=hard \
 // RUN:   | FileCheck %s --check-prefix=CHECK-HF
-// CHECK-HF: armv4t-none-unknown-eabihf
+// CHECK-HF: armv4t-unknown-none-eabihf
 
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=armeb-none-eabihf -march=armv4t \
@@ -37,7 +37,7 @@
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabi -mbig-endian -mfloat-abi=hard \
 // RUN:   | FileCheck %s --check-prefix=CHECK-EB-HF
-// CHECK-EB-HF: armebv4t-none-unknown-eabihf
+// CHECK-EB-HF: armebv4t-unknown-none-eabihf
 
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabi -march=armv8m.main -mbig-endian -mfloat-abi=hard \
@@ -45,4 +45,4 @@
 // RUN: %clang -print-effective-triple \
 // RUN:   --target=arm-none-eabi -mcpu=cortex-m33 -mbig-endian -mfloat-abi=hard \
 // RUN:   | FileCheck %s --check-prefix=CHECK-V8M-EB-HF
-// CHECK-V8M-EB-HF: thumbebv8m.main-none-unknown-eabihf
+// CHECK-V8M-EB-HF: thumbebv8m.main-unknown-none-eabihf
diff --git a/clang/test/Driver/baremetal-multilib-exclusive-group.yaml b/clang/test/Driver/baremetal-multilib-exclusive-group.yaml
index a98549efea4f0a..228c53bbb0f83a 100644
--- a/clang/test/Driver/baremetal-multilib-exclusive-group.yaml
+++ b/clang/test/Driver/baremetal-multilib-exclusive-group.yaml
@@ -8,7 +8,7 @@
 # RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes
 # RUN: ln -s %s %t/baremetal_multilib/lib/clang-runtimes/multilib.yaml
 
-# RUN: %t/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-none-unknown-eabi --sysroot= 2>%t.err
+# RUN: %t/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-unknown-none-eabi --sysroot= 2>%t.err
 
 # RUN: FileCheck -DSYSROOT=%t/baremetal_multilib %s < %t.err --check-prefix=POS
 # RUN: FileCheck -DSYSROOT=%t/baremetal_multilib %s < %t.err --check-prefix=NEG
@@ -16,7 +16,7 @@
 # Expected results:
 #
 # Due to the Mappings section, all six of these library directories should
-# match the command-line flag --target=thumbv7em-none-unknown-eabi.
+# match the command-line flag --target=thumbv7em-unknown-none-eabi.
 #
 # The two "non_exclusive" directories, which don't have an ExclusiveGroup at
 # all, should both be selected. So should the two "own_group", each of which
@@ -49,31 +49,31 @@ Groups:
 
 Variants:
 - Dir: testdir1_non_exclusive
-  Flags: [--target=thumbv7m-none-unknown-eabi]
+  Flags: [--target=thumbv7m-unknown-none-eabi]
 
 - Dir: testdir2_non_exclusive
-  Flags: [--target=thumbv7em-none-unknown-eabi]
+  Flags: [--target=thumbv7em-unknown-none-eabi]
 
 - Dir: testdir1_exclusive
-  Flags: [--target=thumbv7m-none-unknown-eabi]
+  Flags: [--target=thumbv7m-unknown-none-eabi]
   Group: actually_exclude_something
 
 - Dir: testdir2_exclusive
-  Flags: [--target=thumbv7em-none-unknown-eabi]
+  Flags: [--target=thumbv7em-unknown-none-eabi]
   Group: actually_exclude_something
 
 - Dir: testdir3_exclusive
-  Flags: [--target=thumbv7em-none-unknown-eabi]
+  Flags: [--target=thumbv7em-unknown-none-eabi]
   Group: actually_exclude_something
 
 - Dir: testdir1_own_group
-  Flags: [--target=thumbv7m-none-unknown-eabi]
+  Flags: [--target=thumbv7m-unknown-none-eabi]
   Group: foo
 
 - Dir: testdir2_own_group
-  Flags: [--target=thumbv7em-none-unknown-eabi]
+  Flags: [--target=thumbv7em-unknown-none-eabi]
   Group: bar
 
 Mappings:
-- Match: --target=thumbv7em-none-unknown-eabi
-  Flags: [--target=thumbv7m-none-unknown-eabi]
+- Match: --target=thumbv7em-unknown-none-eabi
+  Flags: [--target=thumbv7m-unknown-none-eabi]
diff --git a/clang/test/Driver/baremetal-multilib-group-error.yaml b/clang/test/Driver/baremetal-multilib-group-error.yaml
index 1e8f83fa50d244..9d8a80bf4a9c60 100644
--- a/clang/test/Driver/baremetal-multilib-group-error.yaml
+++ b/clang/test/Driver/baremetal-multilib-group-error.yaml
@@ -8,7 +8,7 @@
 # RUN: mkdir -p %t/baremetal_multilib/lib/clang-runtimes
 # RUN: ln -s %s %t/baremetal_multilib/lib/clang-runtimes/multilib.yaml
 
-# RUN: %t/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-none-unknown-eabi --sysroot= 2>%t.err
+# RUN: %t/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out --target=thumbv7em-unknown-none-eabi --sysroot= 2>%t.err
 # RUN: FileCheck %s < %t.err
 
 ---
@@ -20,7 +20,7 @@ Groups:
 
 Variants:
 - Dir: testdir1
-  Flags: [--target=thumbv7m-none-unknown-eabi]
+  Flags: [--target=thumbv7m-unknown-none-eabi]
   Group: nonexistent_group_name
 
 # CHECK: error: unknown enumerated scalar
diff --git a/clang/test/Driver/baremetal-multilib-layered.yaml b/clang/test/Driver/baremetal-multilib-layered.yaml
index 2f86f8e3ea4f5f..a525436d8122f5 100644
--- a/clang/test/Driver/baremetal-multilib-layered.yaml
+++ b/clang/test/Driver/baremetal-multilib-layered.yaml
@@ -18,7 +18,7 @@
 # RUN: %T/baremetal_multilib_layered/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
 # RUN:     --target=thumbv7m-none-eabi -mfloat-abi=softfp --sysroot= \
 # RUN:   | FileCheck -DSYSROOT=%T/baremetal_multilib_layered %s
-# CHECK:      "-cc1" "-triple" "thumbv7m-none-unknown-eabi"
+# CHECK:      "-cc1" "-triple" "thumbv7m-unknown-none-eabi"
 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include/c++/v1"
 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/soft/include/c++/v1"
 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/softfp/include"
diff --git a/clang/test/Driver/baremetal-multilib.yaml b/clang/test/Driver/baremetal-multilib.yaml
index 3f026cbeb437b2..9ed83e4aec839c 100644
--- a/clang/test/Driver/baremetal-multilib.yaml
+++ b/clang/test/Driver/baremetal-multilib.yaml
@@ -11,7 +11,7 @@
 # RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
 # RUN:     --target=thumbv8m.main-none-eabihf --sysroot= \
 # RUN:   | FileCheck -DSYSROOT=%T/baremetal_multilib %s
-# CHECK:      "-cc1" "-triple" "thumbv8m.main-none-unknown-eabihf"
+# CHECK:      "-cc1" "-triple" "thumbv8m.main-unknown-none-eabihf"
 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/arm-none-eabi/thumb/v8-m.main/fp/include/c++/v1"
 # CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/bin/../lib/clang-runtimes/arm-none-eabi/thumb/v8-m.main/fp/include"
 # CHECK-SAME: "-x" "c++" "{{.*}}baremetal-multilib.yaml"
@@ -24,11 +24,11 @@
 # RUN:     --target=thumbv7em-none-eabi -mfpu=fpv4-sp-d16 --sysroot= \
 # RUN:   | FileCheck --check-prefix=CHECK-NO-MATCH %s
 # CHECK-NO-MATCH: warning: no multilib found matching flags:
-# CHECK-NO-MATCH-SAME: --target=thumbv7em-none-unknown-eabi
+# CHECK-NO-MATCH-SAME: --target=thumbv7em-unknown-none-eabi
 # CHECK-NO-MATCH: note: available multilibs are:
-# CHECK-NO-MATCH: --target=thumbv6m-none-unknown-eabi -mfpu=none
-# CHECK-NO-MATCH: --target=thumbv7m-none-unknown-eabi -mfpu=none
-# CHECK-NO-MATCH: --target=thumbv7em-none-unknown-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv6m-unknown-none-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv7m-unknown-none-eabi -mfpu=none
+# CHECK-NO-MATCH: --target=thumbv7em-unknown-none-eabi -mfpu=none
 
 # RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -print-multi-directory 2>&1 \
 # RUN:     --target=thumbv8m.main-none-eabihf --sysroot= \
@@ -38,16 +38,16 @@
 # RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -print-multi-lib 2>&1 \
 # RUN:     --target=arm-none-eabi --sysroot= \
 # RUN:   | FileCheck --check-prefix=CHECK-PRINT-MULTI-LIB %s
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v6-m/nofp;@-target=thumbv6m-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7-m/nofp;@-target=thumbv7m-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/nofp;@-target=thumbv7em-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/nofp;@-target=thumbv8m.main-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve;@-target=thumbv8.1m.main-none-unknown-eabi at mfpu=none
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16;@-target=thumbv7em-none-unknown-eabihf at mfpu=fpv4-sp-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv5_d16;@-target=thumbv7em-none-unknown-eabihf at mfpu=fpv5-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/fp;@-target=thumbv8m.main-none-unknown-eabihf at mfpu=fpv5-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/fp;@-target=thumbv8.1m.main-none-unknown-eabihf at mfpu=fp-armv8-fullfp16-sp-d16
-# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/mve;@-target=thumbv8.1m.main-none-unknown-eabihf at march=thumbv8.1m.main+mve at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v6-m/nofp;@-target=thumbv6m-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7-m/nofp;@-target=thumbv7m-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/nofp;@-target=thumbv7em-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/nofp;@-target=thumbv8m.main-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve;@-target=thumbv8.1m.main-unknown-none-eabi at mfpu=none
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16;@-target=thumbv7em-unknown-none-eabihf at mfpu=fpv4-sp-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v7e-m/fpv5_d16;@-target=thumbv7em-unknown-none-eabihf at mfpu=fpv5-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8-m.main/fp;@-target=thumbv8m.main-unknown-none-eabihf at mfpu=fpv5-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/fp;@-target=thumbv8.1m.main-unknown-none-eabihf at mfpu=fp-armv8-fullfp16-sp-d16
+# CHECK-PRINT-MULTI-LIB: arm-none-eabi/thumb/v8.1-m.main/nofp/mve;@-target=thumbv8.1m.main-unknown-none-eabihf at march=thumbv8.1m.main+mve at mfpu=none
 
 # RUN: %T/baremetal_multilib/bin/clang -no-canonical-prefixes -x assembler -mexecute-only \
 # RUN:     --target=arm-none-eabi --sysroot= %s -c -### 2>&1 \
@@ -86,37 +86,37 @@ MultilibVersion: 1.0
 
 Variants:
 - Dir: arm-none-eabi/arm/v4t
-  Flags: [--target=armv4t-none-unknown-eabi]
+  Flags: [--target=armv4t-unknown-none-eabi]
 
 - Dir: arm-none-eabi/thumb/v6-m/nofp
-  Flags: [--target=thumbv6m-none-unknown-eabi, -mfpu=none]
+  Flags: [--target=thumbv6m-unknown-none-eabi, -mfpu=none]
 
 - Dir: arm-none-eabi/thumb/v7-m/nofp
-  Flags: [--target=thumbv7m-none-unknown-eabi, -mfpu=none]
+  Flags: [--target=thumbv7m-unknown-none-eabi, -mfpu=none]
 
 - Dir: arm-none-eabi/thumb/v7e-m/nofp
-  Flags: [--target=thumbv7em-none-unknown-eabi, -mfpu=none]
+  Flags: [--target=thumbv7em-unknown-none-eabi, -mfpu=none]
 
 - Dir: arm-none-eabi/thumb/v8-m.main/nofp
-  Flags: [--target=thumbv8m.main-none-unknown-eabi, -mfpu=none]
+  Flags: [--target=thumbv8m.main-unknown-none-eabi, -mfpu=none]
 
 - Dir: arm-none-eabi/thumb/v8.1-m.main/nofp/nomve
-  Flags: [--target=thumbv8.1m.main-none-unknown-eabi, -mfpu=none]
+  Flags: [--target=thumbv8.1m.main-unknown-none-eabi, -mfpu=none]
 
 - Dir: arm-none-eabi/thumb/v7e-m/fpv4_sp_d16
-  Flags: [--target=thumbv7em-none-unknown-eabihf, -mfpu=fpv4-sp-d16]
+  Flags: [--target=thumbv7em-unknown-none-eabihf, -mfpu=fpv4-sp-d16]
 
 - Dir: arm-none-eabi/thumb/v7e-m/fpv5_d16
-  Flags: [--target=thumbv7em-none-unknown-eabihf, -mfpu=fpv5-d16]
+  Flags: [--target=thumbv7em-unknown-none-eabihf, -mfpu=fpv5-d16]
 
 - Dir: arm-none-eabi/thumb/v8-m.main/fp
-  Flags: [--target=thumbv8m.main-none-unknown-eabihf, -mfpu=fpv5-d16]
+  Flags: [--target=thumbv8m.main-unknown-none-eabihf, -mfpu=fpv5-d16]
 
 - Dir: arm-none-eabi/thumb/v8.1-m.main/fp
-  Flags: [--target=thumbv8.1m.main-none-unknown-eabihf, -mfpu=fp-armv8-fullfp16-sp-d16]
+  Flags: [--target=thumbv8.1m.main-unknown-none-eabihf, -mfpu=fp-armv8-fullfp16-sp-d16]
 
 - Dir: arm-none-eabi/thumb/v8.1-m.main/nofp/mve
-  Flags: [--target=thumbv8.1m.main-none-unknown-eabihf, -march=thumbv8.1m.main+mve, -mfpu=none]
+  Flags: [--target=thumbv8.1m.main-unknown-none-eabihf, -march=thumbv8.1m.main+mve, -mfpu=none]
 
 
 # The second section of the file is a map from auto-detected flags
@@ -126,17 +126,17 @@ Variants:
 # All flags in the "Flags" list will be added if an argument matches.
 Mappings:
 # For v8m.base (and potential later v8m baseline versions) use v6m
-- Match: --target=thumbv8(\.[0-9]+)?m\.base-none-unknown-eabi
-  Flags: [--target=thumbv6m-none-unknown-eabi]
+- Match: --target=thumbv8(\.[0-9]+)?m\.base-unknown-none-eabi
+  Flags: [--target=thumbv6m-unknown-none-eabi]
 # Match versions after v8.1m.main. We assume that v8.2m (if/when it exists) will
 # be backwards compatible with v8.1m.
 # The alternative is to not recognise later versions, and require that
 # this multilib spec is updated before it can be used with newer
 # architecture versions.
-- Match: --target=thumbv8\.[1-9]m\.main-none-unknown-eabi
-  Flags: [--target=thumbv8.1m.main-none-unknown-eabi]
-- Match: --target=thumbv8\.[1-9]m\.main-none-unknown-eabihf
-  Flags: [--target=thumbv8.1m.main-none-unknown-eabihf]
+- Match: --target=thumbv8\.[1-9]m\.main-unknown-none-eabi
+  Flags: [--target=thumbv8.1m.main-unknown-none-eabi]
+- Match: --target=thumbv8\.[1-9]m\.main-unknown-none-eabihf
+  Flags: [--target=thumbv8.1m.main-unknown-none-eabihf]
 
 - Match: -march=thumbv8\.[1-9]m\.main.*\+mve($|\+).*
   Flags: [-march=thumbv8.1m.main+mve]
diff --git a/clang/test/Driver/baremetal-sysroot.cpp b/clang/test/Driver/baremetal-sysroot.cpp
index bbc608809d0e48..18654be33b87c9 100644
--- a/clang/test/Driver/baremetal-sysroot.cpp
+++ b/clang/test/Driver/baremetal-sysroot.cpp
@@ -12,7 +12,7 @@
 // RUN: %T/baremetal_default_sysroot/bin/clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \
 // RUN:     -target armv6m-none-eabi --sysroot= \
 // RUN:   | FileCheck --check-prefix=CHECK-V6M-C %s
-// CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
+// CHECK-V6M-C: "{{.*}}clang{{.*}}" "-cc1" "-triple" "thumbv6m-unknown-none-eabi"
 // CHECK-V6M-C-SAME: "-internal-isystem" "{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
 // CHECk-V6M-C-SAME: "-internal-isystem" "{{.*}}/baremetal_default_sysroot{{[/\\]+}}bin{{[/\\]+}}..{{[/\\]+}}lib{{[/\\]+}}clang-runtimes{{[/\\]+}}armv6m-none-eabi{{[/\\]+}}include"
 // CHECK-V6M-C-SAME: "-x" "c++" "{{.*}}baremetal-sysroot.cpp"
diff --git a/clang/test/Driver/baremetal.cpp b/clang/test/Driver/baremetal.cpp
index 657611bb3f38de..cc14f045df3f9a 100644
--- a/clang/test/Driver/baremetal.cpp
+++ b/clang/test/Driver/baremetal.cpp
@@ -9,7 +9,7 @@
 // RUN:     -L some/directory/user/asked/for \
 // RUN:     --sysroot=%S/Inputs/baremetal_arm \
 // RUN:   | FileCheck --check-prefix=CHECK-V6M-C %s
-// CHECK-V6M-C:      "-cc1" "-triple" "thumbv6m-none-unknown-eabi"
+// CHECK-V6M-C:      "-cc1" "-triple" "thumbv6m-unknown-none-eabi"
 // CHECK-V6M-C-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
 // CHECK-V6M-C-SAME: "-isysroot" "[[SYSROOT:[^"]*]]"
 // CHECK-V6M-C-SAME: "-internal-isystem" "[[SYSROOT]]{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
diff --git a/clang/test/Driver/print-multi-selection-flags.c b/clang/test/Driver/print-multi-selection-flags.c
index 06a12db9d97792..9f58d1b557fd74 100644
--- a/clang/test/Driver/print-multi-selection-flags.c
+++ b/clang/test/Driver/print-multi-selection-flags.c
@@ -5,27 +5,27 @@
 // CHECK-FUCHSIA: --target=aarch64-unknown-fuchsia
 
 // RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -fno-exceptions -fno-rtti | FileCheck --check-prefix=CHECK-ARMV4T %s
-// CHECK-ARMV4T: --target=armv4t-none-unknown-eabi
+// CHECK-ARMV4T: --target=armv4t-unknown-none-eabi
 // CHECK-ARMV4T: -mfloat-abi=soft
 // CHECK-ARMV4T: -mfpu=none
 
 // RUN: %clang -print-multi-flags-experimental --target=armv7em-none-eabi -mfloat-abi=softfp | FileCheck --check-prefix=CHECK-SOFTFP %s
-// CHECK-SOFTFP: --target=thumbv7em-none-unknown-eabi
+// CHECK-SOFTFP: --target=thumbv7em-unknown-none-eabi
 // CHECK-SOFTFP: -mfloat-abi=softfp
 // CHECK-SOFTFP: -mfpu=fpv4-sp-d16
 
 // RUN: %clang -print-multi-flags-experimental --target=arm-none-eabihf -march=armv7em -mfpu=fpv5-d16 | FileCheck --check-prefix=CHECK-HARD %s
-// CHECK-HARD: --target=thumbv7em-none-unknown-eabihf
+// CHECK-HARD: --target=thumbv7em-unknown-none-eabihf
 // CHECK-HARD: -mfloat-abi=hard
 // CHECK-HARD: -mfpu=fpv5-d16
 
 // RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=soft -march=armv8-m.main+nofp | FileCheck --check-prefix=CHECK-V8MMAIN-NOFP %s
-// CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-none-unknown-eabi
+// CHECK-V8MMAIN-NOFP: --target=thumbv8m.main-unknown-none-eabi
 // CHECK-V8MMAIN-NOFP: -mfloat-abi=soft
 // CHECK-V8MMAIN-NOFP: -mfpu=none
 
 // RUN: %clang -print-multi-flags-experimental --target=arm-none-eabi -mfloat-abi=hard -march=armv8.1m.main+mve.fp | FileCheck --check-prefix=CHECK-MVE %s
-// CHECK-MVE: --target=thumbv8.1m.main-none-unknown-eabihf
+// CHECK-MVE: --target=thumbv8.1m.main-unknown-none-eabihf
 // CHECK-MVE: -march=thumbv8.1m.main{{.*}}+mve{{.*}}+mve.fp{{.*}}
 // CHECK-MVE: -mfloat-abi=h...
[truncated]

``````````

</details>


https://github.com/llvm/llvm-project/pull/90313


More information about the cfe-commits mailing list