[llvm-branch-commits] [llvm] 27afc09 - [NFC] Disallow unused prefixes under Other

Mircea Trofin via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Jan 19 12:36:28 PST 2021


Author: Mircea Trofin
Date: 2021-01-19T12:22:29-08:00
New Revision: 27afc091e2c0caa954326129adb86987d1b41c91

URL: https://github.com/llvm/llvm-project/commit/27afc091e2c0caa954326129adb86987d1b41c91
DIFF: https://github.com/llvm/llvm-project/commit/27afc091e2c0caa954326129adb86987d1b41c91.diff

LOG: [NFC] Disallow unused prefixes under Other

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

Added: 
    llvm/test/Other/lit.local.cfg

Modified: 
    llvm/test/Other/new-pass-manager.ll
    llvm/test/Other/opt-LTO-pipeline.ll
    llvm/test/Other/opt-bisect-legacy-pass-manager.ll
    llvm/test/Other/print-slotindexes.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Other/lit.local.cfg b/llvm/test/Other/lit.local.cfg
new file mode 100644
index 0000000000000..1b775f32afe07
--- /dev/null
+++ b/llvm/test/Other/lit.local.cfg
@@ -0,0 +1,12 @@
+from lit.llvm.subst import ToolSubst
+
+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'))
+
+# FIXME: this substitution should be removed together with the above, when the
+# default --allow-unused-prefixes is fixed. At that point, the use of %FileCheckRaw%
+# in opt-bisect-legacy-pass-manager.ll should be switched back to just FileCheck.
+config.substitutions.append(('%FileCheckRaw%', 'FileCheck'))

diff  --git a/llvm/test/Other/new-pass-manager.ll b/llvm/test/Other/new-pass-manager.ll
index 1206f2c4b5dc4..f1e3702145bd7 100644
--- a/llvm/test/Other/new-pass-manager.ll
+++ b/llvm/test/Other/new-pass-manager.ll
@@ -366,6 +366,9 @@
 ; CHECK-EXT-NEXT: Starting llvm::Function pass manager run.
 ; CHECK-EXT-NEXT: Running pass: {{.*}}Bye
 ; CHECK-EXT-NEXT: Finished llvm::Function pass manager run.
+; We don't have checks for CHECK-NOEXT here, but this simplifies the test, while
+; avoiding FileCheck complaining about the unused prefix.
+; CHECK-NOEXT: {{.*}}
 ; CHECK-O0-NEXT: Finished llvm::Module pass manager run
 
 ; RUN: opt -disable-output -disable-verify -debug-pass-manager \

diff  --git a/llvm/test/Other/opt-LTO-pipeline.ll b/llvm/test/Other/opt-LTO-pipeline.ll
index a3de1b9de3f9c..14f6329b2540b 100644
--- a/llvm/test/Other/opt-LTO-pipeline.ll
+++ b/llvm/test/Other/opt-LTO-pipeline.ll
@@ -1,4 +1,4 @@
-; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -std-link-opts -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefixes=CHECK,%llvmcheckext %s
+; RUN: opt -enable-new-pm=0 -mtriple=x86_64-- -std-link-opts -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK %s
 
 ; REQUIRES: asserts
 

diff  --git a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll b/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
index 8d966deeccd70..decd9db6636f8 100644
--- a/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
+++ b/llvm/test/Other/opt-bisect-legacy-pass-manager.ll
@@ -39,7 +39,7 @@
 ; f2() in f3().
 
 ; RUN: %python %S/opt-bisect-helper.py --start=0 --end=256 --optcmd=opt \
-; RUN:         --filecheckcmd=FileCheck --test=%s \
+; RUN:         --filecheckcmd=%FileCheckRaw% --test=%s \
 ; RUN:         --prefix=CHECK-BISECT-INLINE-HELPER \
 ; RUN:         | FileCheck %s --check-prefix=CHECK-BISECT-INLINE-RESULT
 ; The helper script uses this to find the optimization that inlines the call.

diff  --git a/llvm/test/Other/print-slotindexes.ll b/llvm/test/Other/print-slotindexes.ll
index 722a3dc5a9389..cc0abb75a59b0 100644
--- a/llvm/test/Other/print-slotindexes.ll
+++ b/llvm/test/Other/print-slotindexes.ll
@@ -1,5 +1,5 @@
-; RUN: llc -print-after=slotindexes < %s 2>&1 | FileCheck %s --check-prefixes=ALL,SI 
-; RUN: llc -print-after=slotindexes -print-slotindexes=false < %s 2>&1 | FileCheck %s --check-prefixes=ALL,NOSI
+; RUN: llc -print-after=slotindexes < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,SI 
+; RUN: llc -print-after=slotindexes -print-slotindexes=false < %s 2>&1 | FileCheck %s --check-prefixes=CHECK,NOSI
 ; REQUIRES: default_triple
 define void @foo(){
   ret void


        


More information about the llvm-branch-commits mailing list