[PATCH] D94616: [NFC] Disallow unused prefixes under MC/AArch64

Mircea Trofin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 13 10:40:21 PST 2021


mtrofin created this revision.
mtrofin added a reviewer: pratlucas.
Herald added subscribers: danielkiss, kristof.beyls.
mtrofin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D94616

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


Index: llvm/test/MC/AArch64/lit.local.cfg
===================================================================
--- llvm/test/MC/AArch64/lit.local.cfg
+++ 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'))
Index: llvm/test/MC/AArch64/armv8.7a-xs.s
===================================================================
--- llvm/test/MC/AArch64/armv8.7a-xs.s
+++ 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
Index: llvm/test/MC/AArch64/armv8.7a-ls64.s
===================================================================
--- llvm/test/MC/AArch64/armv8.7a-ls64.s
+++ 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]


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94616.316448.patch
Type: text/x-patch
Size: 2266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210113/0cfad311/attachment.bin>


More information about the llvm-commits mailing list