diff --git a/llvm/test/Analysis/lit.local.cfg b/llvm/test/Analysis/lit.local.cfg deleted file mode 100644 --- a/llvm/test/Analysis/lit.local.cfg +++ /dev/null @@ -1,9 +0,0 @@ -# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: -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')) - diff --git a/llvm/test/CodeGen/lit.local.cfg b/llvm/test/CodeGen/lit.local.cfg deleted file mode 100644 --- a/llvm/test/CodeGen/lit.local.cfg +++ /dev/null @@ -1,7 +0,0 @@ -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')) diff --git a/llvm/test/FileCheck/lit.local.cfg b/llvm/test/FileCheck/lit.local.cfg --- a/llvm/test/FileCheck/lit.local.cfg +++ b/llvm/test/FileCheck/lit.local.cfg @@ -54,3 +54,12 @@ # that test results throughout all test suites are affected. config.substitutions.append(('%ProtectFileCheckOutput', 'env -u FILECHECK_OPTS')) + +# FIXME: remove this once the default is flipped. +from lit.llvm.subst import ToolSubst + +fc = ToolSubst('FileCheck', unresolved='fatal') +# the parent introduced the opposite rule, so we replace it if we see it. +if len(config.substitutions) > 0 and config.substitutions[0] == (fc.regex, 'FileCheck --allow-unused-prefixes=false'): + del config.substitutions[0] + diff --git a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll --- a/llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll +++ b/llvm/test/Instrumentation/AddressSanitizer/global_metadata_array.ll @@ -1,9 +1,9 @@ -; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s -; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s -; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-apple-macosx10.11.0 -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s -; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-apple-macosx10.11.0 -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s -; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-pc-windows-msvc19.0.24215 -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s -; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-pc-windows-msvc19.0.24215 -S | FileCheck --check-prefixes=CHECK,CHECK-S3 %s +; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefix=CHECK %s +; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefix=CHECK %s +; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-apple-macosx10.11.0 -S | FileCheck --check-prefix=CHECK %s +; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-apple-macosx10.11.0 -S | FileCheck --check-prefix=CHECK %s +; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -mtriple=x86_64-pc-windows-msvc19.0.24215 -S | FileCheck --check-prefix=CHECK %s +; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -mtriple=x86_64-pc-windows-msvc19.0.24215 -S | FileCheck --check-prefix=CHECK %s ; RUN: opt < %s -asan -asan-module -enable-new-pm=0 -asan-globals-live-support=0 -asan-mapping-scale=5 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefixes=CHECK,CHECK-S5 %s ; RUN: opt < %s -passes='asan-pipeline' -asan-globals-live-support=0 -asan-mapping-scale=5 -mtriple=x86_64-unknown-linux-gnu -S | FileCheck --check-prefixes=CHECK,CHECK-S5 %s diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll b/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll --- a/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/basic.ll @@ -1,14 +1,14 @@ ; Test basic address sanitizer instrumentation. ; -; RUN: opt < %s -hwasan -hwasan-recover=0 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT,ABORT-DYNAMIC-SHADOW +; RUN: opt < %s -hwasan -hwasan-recover=0 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT ; RUN: opt < %s -hwasan -hwasan-recover=1 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,RECOVER,RECOVER-DYNAMIC-SHADOW -; RUN: opt < %s -hwasan -hwasan-recover=0 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT,ABORT-ZERO-BASED-SHADOW +; RUN: opt < %s -hwasan -hwasan-recover=0 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT ; RUN: opt < %s -hwasan -hwasan-recover=1 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,RECOVER,RECOVER-ZERO-BASED-SHADOW ; Ensure than hwasan runs with the new PM pass -; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT,ABORT-DYNAMIC-SHADOW +; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT ; RUN: opt < %s -passes=hwasan -hwasan-recover=1 -hwasan-with-ifunc=1 -hwasan-with-tls=0 -S | FileCheck %s --check-prefixes=CHECK,RECOVER,RECOVER-DYNAMIC-SHADOW -; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT,ABORT-ZERO-BASED-SHADOW +; RUN: opt < %s -passes=hwasan -hwasan-recover=0 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,ABORT ; RUN: opt < %s -passes=hwasan -hwasan-recover=1 -hwasan-mapping-offset=0 -S | FileCheck %s --check-prefixes=CHECK,RECOVER,RECOVER-ZERO-BASED-SHADOW ; CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* @hwasan.module_ctor, i8* bitcast (void ()* @hwasan.module_ctor to i8*) }] diff --git a/llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll b/llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll --- a/llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll +++ b/llvm/test/Instrumentation/HWAddressSanitizer/prologue.ll @@ -9,7 +9,7 @@ ; RUN: opt -hwasan -S -hwasan-with-ifunc=0 -hwasan-with-tls=0 < %s | \ ; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-GLOBAL,CHECK-NOHISTORY ; RUN: opt -hwasan -S -hwasan-with-ifunc=1 -hwasan-with-tls=0 < %s | \ -; RUN: FileCheck %s --check-prefixes=CHECK,CHECk-NOGLOBAL,CHECK-IFUNC,CHECK-NOHISTORY +; RUN: FileCheck %s --check-prefixes=CHECK,CHECK-IFUNC,CHECK-NOHISTORY target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" target triple = "aarch64--linux-android22" diff --git a/llvm/test/Instrumentation/MemorySanitizer/array_types.ll b/llvm/test/Instrumentation/MemorySanitizer/array_types.ll --- a/llvm/test/Instrumentation/MemorySanitizer/array_types.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/array_types.ll @@ -3,8 +3,8 @@ ; RUN: opt < %s -msan -msan-check-access-address=0 -S | FileCheck %s ; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -S \ ; RUN: -passes=msan 2>&1 | FileCheck -check-prefix=CHECK \ -; RUN: -check-prefix=CHECK-ORIGINS %s --allow-empty -; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=1 -S | FileCheck -check-prefix=CHECK -check-prefix=CHECK-ORIGINS %s +; RUN: %s --allow-empty +; RUN: opt < %s -msan -msan-check-access-address=0 -msan-track-origins=1 -S | FileCheck -check-prefix=CHECK %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/MemorySanitizer/check-array.ll b/llvm/test/Instrumentation/MemorySanitizer/check-array.ll --- a/llvm/test/Instrumentation/MemorySanitizer/check-array.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/check-array.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -msan-eager-checks -msan-check-access-address=0 -msan-track-origins=1 -S -passes='module(msan-module),function(msan)' 2>&1 | \ -; RUN: FileCheck -allow-deprecated-dag-overlap -check-prefixes=CHECK,CHECK-ORIGINS %s +; RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/MemorySanitizer/check-struct.ll b/llvm/test/Instrumentation/MemorySanitizer/check-struct.ll --- a/llvm/test/Instrumentation/MemorySanitizer/check-struct.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/check-struct.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -S -passes='module(msan-module),function(msan)' 2>&1 | \ -; RUN: FileCheck -allow-deprecated-dag-overlap -check-prefixes=CHECK,CHECK-ORIGINS %s +; RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/MemorySanitizer/freeze.ll b/llvm/test/Instrumentation/MemorySanitizer/freeze.ll --- a/llvm/test/Instrumentation/MemorySanitizer/freeze.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/freeze.ll @@ -1,5 +1,5 @@ ; RUN: opt < %s -msan-check-access-address=0 -S -passes=msan 2>&1 | FileCheck %s -; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=2 -S -passes=msan 2>&1 | FileCheck %s -check-prefixes=CHECK,CHECK-ORIGIN +; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=2 -S -passes=msan 2>&1 | FileCheck %s ; RUN: opt < %s -msan -msan-check-access-address=0 -S | FileCheck %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll b/llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll --- a/llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/msan_asm_conservative.ll @@ -1,8 +1,8 @@ ; Test for handling of asm constraints in MSan instrumentation. ; RUN: opt < %s -msan-kernel=1 -msan-check-access-address=0 \ ; RUN: -msan-handle-asm-conservative=0 -S -passes=msan 2>&1 | FileCheck \ -; RUN: "-check-prefixes=CHECK,CHECK-NONCONS" %s -; RUN: opt < %s -msan -msan-kernel=1 -msan-check-access-address=0 -msan-handle-asm-conservative=0 -S | FileCheck -check-prefixes=CHECK,CHECK-NONCONS %s +; RUN: "-check-prefix=CHECK" %s +; RUN: opt < %s -msan -msan-kernel=1 -msan-check-access-address=0 -msan-handle-asm-conservative=0 -S | FileCheck -check-prefixes=CHECK %s ; RUN: opt < %s -msan-kernel=1 -msan-check-access-address=0 \ ; RUN: -msan-handle-asm-conservative=1 -S -passes=msan 2>&1 | FileCheck \ ; RUN: "-check-prefixes=CHECK,CHECK-CONS" %s diff --git a/llvm/test/Instrumentation/MemorySanitizer/msan_eager.ll b/llvm/test/Instrumentation/MemorySanitizer/msan_eager.ll --- a/llvm/test/Instrumentation/MemorySanitizer/msan_eager.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/msan_eager.ll @@ -1,6 +1,6 @@ ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -msan-eager-checks -S -passes='module(msan-module),function(msan)' 2>&1 | \ -; RUN: FileCheck -allow-deprecated-dag-overlap -check-prefixes=CHECK,CHECK-ORIGINS %s +; RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll b/llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll --- a/llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/msan_x86_bts_asm.ll @@ -1,8 +1,8 @@ ; Test for the conservative assembly handling mode used by KMSAN. ; RUN: opt < %s -msan-kernel=1 -msan-check-access-address=0 \ ; RUN: -msan-handle-asm-conservative=0 -S -passes=msan 2>&1 | FileCheck \ -; RUN: "-check-prefixes=CHECK,CHECK-NONCONS" %s -; RUN: opt < %s -msan -msan-kernel=1 -msan-check-access-address=0 -msan-handle-asm-conservative=0 -S | FileCheck -check-prefixes=CHECK,CHECK-NONCONS %s +; RUN: "-check-prefix=CHECK" %s +; RUN: opt < %s -msan -msan-kernel=1 -msan-check-access-address=0 -msan-handle-asm-conservative=0 -S | FileCheck -check-prefixes=CHECK %s ; RUN: opt < %s -msan-kernel=1 -msan-check-access-address=0 \ ; RUN: -msan-handle-asm-conservative=1 -S -passes=msan 2>&1 | FileCheck \ ; RUN: "-check-prefixes=CHECK,CHECK-CONS" %s diff --git a/llvm/test/Instrumentation/MemorySanitizer/reduce.ll b/llvm/test/Instrumentation/MemorySanitizer/reduce.ll --- a/llvm/test/Instrumentation/MemorySanitizer/reduce.ll +++ b/llvm/test/Instrumentation/MemorySanitizer/reduce.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -msan-check-access-address=0 -msan-track-origins=1 -S -passes='module(msan-module),function(msan)' 2>&1 | \ -; RUN: FileCheck -allow-deprecated-dag-overlap -check-prefixes=CHECK,CHECK-ORIGINS %s +; RUN: FileCheck -allow-deprecated-dag-overlap --check-prefix=CHECK %s target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" target triple = "x86_64-unknown-linux-gnu" diff --git a/llvm/test/MC/AArch64/lit.local.cfg b/llvm/test/MC/AArch64/lit.local.cfg --- a/llvm/test/MC/AArch64/lit.local.cfg +++ b/llvm/test/MC/AArch64/lit.local.cfg @@ -1,10 +1,2 @@ -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')) diff --git a/llvm/test/MC/AMDGPU/lit.local.cfg b/llvm/test/MC/AMDGPU/lit.local.cfg --- a/llvm/test/MC/AMDGPU/lit.local.cfg +++ b/llvm/test/MC/AMDGPU/lit.local.cfg @@ -1,10 +1,2 @@ -from lit.llvm.subst import ToolSubst - if not 'AMDGPU' 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')) diff --git a/llvm/test/MC/ARM/lit.local.cfg b/llvm/test/MC/ARM/lit.local.cfg --- a/llvm/test/MC/ARM/lit.local.cfg +++ b/llvm/test/MC/ARM/lit.local.cfg @@ -1,10 +1,2 @@ -from lit.llvm.subst import ToolSubst - if not 'ARM' 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')) diff --git a/llvm/test/MC/RISCV/lit.local.cfg b/llvm/test/MC/RISCV/lit.local.cfg --- a/llvm/test/MC/RISCV/lit.local.cfg +++ b/llvm/test/MC/RISCV/lit.local.cfg @@ -1,10 +1,2 @@ -from lit.llvm.subst import ToolSubst - if not 'RISCV' 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')) diff --git a/llvm/test/Other/lit.local.cfg b/llvm/test/Other/lit.local.cfg deleted file mode 100644 --- a/llvm/test/Other/lit.local.cfg +++ /dev/null @@ -1,12 +0,0 @@ -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/Reduce/lit.local.cfg b/llvm/test/Reduce/lit.local.cfg new file mode 100644 --- /dev/null +++ b/llvm/test/Reduce/lit.local.cfg @@ -0,0 +1,8 @@ +# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: +# FIXME: remove this file when we flip the default for --allow-unused-prefixes. +from lit.llvm.subst import ToolSubst + +fc = ToolSubst('FileCheck', unresolved='fatal') +# the parent introduced the opposite rule, so we replace it if we see it. +if len(config.substitutions) > 0 and config.substitutions[0] == (fc.regex, 'FileCheck --allow-unused-prefixes=false'): + del config.substitutions[0] diff --git a/llvm/test/Transforms/lit.local.cfg b/llvm/test/Transforms/lit.local.cfg deleted file mode 100644 --- a/llvm/test/Transforms/lit.local.cfg +++ /dev/null @@ -1,8 +0,0 @@ -# -*- Python -*- vim: set ft=python ts=4 sw=4 expandtab tw=79: -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')) diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -82,10 +82,20 @@ return '' return found_dylibs[0] -# Define this first. Afterwards, use_default_substitutions will add the rule for -# expanding FileCheck to the full path. -config.substitutions.append(('%FileCheckWithUnusedPrefixes%', - 'FileCheck --allow-unused-prefixes=true')) + +#################################################### +# FIXME: remove this when we flip the default value for --allow-unused-prefixes +# to false. +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')) +# When addressing this fixme, replace %FileCheckRaw% with just FileCheck. +config.substitutions.append(('%FileCheckRaw%', 'FileCheck')) +# Also remove the lit.local.cfg under llvm/test/Reduce +# and the pertinent FIXME in llvm/test/FileCheck +#################################################### llvm_config.use_default_substitutions()