diff --git a/llvm/test/Analysis/lit.local.cfg b/llvm/test/Analysis/lit.local.cfg deleted file mode 100644 index 07c3132153e73a0f361369f0dda46d29986c0233..0000000000000000000000000000000000000000 --- 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 index 2499077fdcd71516d31c0b70000597e7b99fc5e5..0000000000000000000000000000000000000000 --- 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 index 9164f683fc1be3197554c22893aebc802936202e..74e4d89e416b265cd17e6093c0fda1d7279ace06 100644 --- a/llvm/test/FileCheck/lit.local.cfg +++ b/llvm/test/FileCheck/lit.local.cfg @@ -54,3 +54,12 @@ config.test_format = lit.formats.ShTest(execute_external=False) # 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 index f5b9e4c2408dd3d66a4ede0ceaf783055dcb39d0..e8a8d8e1dfa0063393ca2f2c46fd609d9abedb78 100644 --- 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 index 130e20dfea87f00fa53cfabc3044094d67a43ac1..e139e3c9cbafd1fc64ecf0a00157371637128da9 100644 --- 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 index babfd9d725d62701d3b62b1c88a2bcb18c068d31..d74940fe68a28090bbebae9a687747cfd2b08025 100644 --- 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 index cc397e12e42c30d0df6065832b02ec580fb6d07c..0beade542dbcb8bc36ba62ad0e338f5823a30ff1 100644 --- 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 index 6d1e517a186d48a6ac6f6abbc5d2dfc7b9e88633..283913fc658a9a9ef4f22f429c14710ad5be6b97 100644 --- 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 index 344dab45db231988eff4f79ef038afc1509fa21c..1ecf3fc9a6039e68ed55164c97ee9527c79a916b 100644 --- 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 index 4be8d9efd63195d0e10d1fb0f0e57d6e21a4b985..32cb5b77cee270862ce8d289030eccf70dfcd54b 100644 --- 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 index 296e62a9200e5fe11a1f87216adc8655d9bf4f9f..749145142445b607b6e8fada2b06c689be537665 100644 --- 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 index bb44dea03da9a37a4a24279619e9577a467c7a23..3912b9ad1d90d78c5b5708572cba6721d2dfdbb4 100644 --- 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 index d9bf307c2b525bf10e5a446f75bfc53771453abb..22c206faa0e96a56d319915fa4876ff309116ab1 100644 --- 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 index 2629756644e59401ecbb7248fefe00ff85e28f90..add81a5d883a0d5b3cda3448f7db981cc770c2ff 100644 --- 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 index ab829130e2696acc6764f7f9eb12b99586902b2b..5822b72266874f012f161d6aaef5962644d37c4b 100644 --- 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 index 27c8bcd8e82f29f0f24a4e908abb781070f5d86c..2a665f06be72e5515ca6e27018facb35daa201be 100644 --- 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 index b305cf706e7781ff25652191484e92cf4e2e8472..236e1d34416659068d4434bd878989a4165d35c4 100644 --- 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 index 896e7941295e36ce6b05cb9311087dff3631801d..c63820126f8ca6ce0511f50de23b37b5e484bb70 100644 --- 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 index 1b775f32afe07e6e4850bed15ff79a5a6febbc65..0000000000000000000000000000000000000000 --- 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 index 0000000000000000000000000000000000000000..dcd414b5eaf507faf104ad0752e46ee42478070e --- /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 index 0a317f9a9ff90d9fe9716efe51cc21a0dbfad374..0000000000000000000000000000000000000000 --- 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 index 2fb5d021d0fc58d85ec3d3523f6eb73450e8f2dc..348ab62c7bb89eb987f9d38d10c34feb08cad3ee 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -82,10 +82,20 @@ def get_asan_rtlib(): 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()