[llvm] 35c8a6c - [NFC] Disallow unused prefixes under MC/AArch64

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 14 09:46:29 PST 2021


Author: Mircea Trofin
Date: 2021-01-14T09:46:13-08:00
New Revision: 35c8a6cbf5ff0b525e2c01e5d746067bdda1dde7

URL: https://github.com/llvm/llvm-project/commit/35c8a6cbf5ff0b525e2c01e5d746067bdda1dde7
DIFF: https://github.com/llvm/llvm-project/commit/35c8a6cbf5ff0b525e2c01e5d746067bdda1dde7.diff

LOG: [NFC] Disallow unused prefixes under MC/AArch64

Differential Revision: https://reviews.llvm.org/D94616

Added: 
    

Modified: 
    llvm/test/MC/AArch64/armv8.7a-ls64.s
    llvm/test/MC/AArch64/armv8.7a-xs.s
    llvm/test/MC/AArch64/lit.local.cfg

Removed: 
    


################################################################################
diff  --git a/llvm/test/MC/AArch64/armv8.7a-ls64.s b/llvm/test/MC/AArch64/armv8.7a-ls64.s
index c647ecce53f0..d4684e38cbea 100644
--- a/llvm/test/MC/AArch64/armv8.7a-ls64.s
+++ b/llvm/test/MC/AArch64/armv8.7a-ls64.s
@@ -1,7 +1,7 @@
 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+ls64 < %s 2>%t | FileCheck %s
-// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-LS64-ERR %s < %t
+// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t
 // RUN: not llvm-mc -triple aarch64-none-linux-gnu < %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-NO-LS64-ERR %s < %t
+// RUN: FileCheck --check-prefixes=CHECK-ERR,CHECK-NO-LS64-ERR %s < %t
 
   ld64b x0, [x13]
   st64b x14, [x13]

diff  --git a/llvm/test/MC/AArch64/armv8.7a-xs.s b/llvm/test/MC/AArch64/armv8.7a-xs.s
index 6193c1f15f53..e3a1e12aae9a 100644
--- a/llvm/test/MC/AArch64/armv8.7a-xs.s
+++ b/llvm/test/MC/AArch64/armv8.7a-xs.s
@@ -1,9 +1,9 @@
 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a,+xs < %s 2>%t | FileCheck %s
-// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-XS-ERR %s < %t
+// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t
 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.7a < %s 2>%t | FileCheck %s
-// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-XS-ERR %s < %t
+// RUN: FileCheck --check-prefix=CHECK-ERR %s < %t
 // RUN: not llvm-mc -triple aarch64-none-linux-gnu -mattr=+v8.4a < %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-ERR --check-prefix=CHECK-NO-XS-ERR %s < %t
+// RUN: FileCheck --check-prefixes=CHECK-ERR,CHECK-NO-XS-ERR %s < %t
 
   dsb #16
   dsb #20

diff  --git a/llvm/test/MC/AArch64/lit.local.cfg b/llvm/test/MC/AArch64/lit.local.cfg
index 5822b7226687..ab829130e269 100644
--- a/llvm/test/MC/AArch64/lit.local.cfg
+++ b/llvm/test/MC/AArch64/lit.local.cfg
@@ -1,2 +1,10 @@
+from lit.llvm.subst import ToolSubst
+
 if 'AArch64' not in config.root.targets:
     config.unsupported = True
+
+fc = ToolSubst('FileCheck', unresolved='fatal')
+# Insert this first. Then, we'll first update the blank FileCheck command; then,
+# the default substitution of FileCheck will replace it to its full path.
+config.substitutions.insert(0, (fc.regex,
+    'FileCheck --allow-unused-prefixes=false'))


        


More information about the llvm-commits mailing list