Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 37206fb

Browse files
Auto merge of #145428 - tgross35:less-filecheck-magic, r=<try>
compiletest: Require explicit `--filecheck-prefixes` try-job: aarch64-apple try-job: i686-gnu-* try-job: test-various try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
2 parents cd7cbe8 + 3fa9db2 commit 37206fb

File tree

85 files changed

+244
-42
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+244
-42
lines changed

‎src/tools/compiletest/src/runtest.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2071,25 +2071,6 @@ impl<'test> TestCx<'test> {
20712071
let mut filecheck = Command::new(self.config.llvm_filecheck.as_ref().unwrap());
20722072
filecheck.arg("--input-file").arg(output).arg(&self.testpaths.file);
20732073

2074-
// Because we use custom prefixes, we also have to register the default prefix.
2075-
filecheck.arg("--check-prefix=CHECK");
2076-
2077-
// FIXME(#134510): auto-registering revision names as check prefix is a bit sketchy, and
2078-
// that having to pass `--allow-unused-prefix` is an unfortunate side-effect of not knowing
2079-
// whether the test author actually wanted revision-specific check prefixes or not.
2080-
//
2081-
// TL;DR We may not want to conflate `compiletest` revisions and `FileCheck` prefixes.
2082-
2083-
// HACK: tests are allowed to use a revision name as a check prefix.
2084-
if let Some(rev) = self.revision {
2085-
filecheck.arg("--check-prefix").arg(rev);
2086-
}
2087-
2088-
// HACK: the filecheck tool normally fails if a prefix is defined but not used. However,
2089-
// sometimes revisions are used to specify *compiletest* directives which are not FileCheck
2090-
// concerns.
2091-
filecheck.arg("--allow-unused-prefixes");
2092-
20932074
// Provide more context on failures.
20942075
filecheck.args(&["--dump-input-context", "100"]);
20952076

‎tests/assembly-llvm/aarch64-pointer-auth.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@
66
//@ needs-llvm-components: aarch64
77
//@ compile-flags: --target aarch64-unknown-linux-gnu
88
//@ [PACRET] compile-flags: -Z branch-protection=pac-ret,leaf
9+
//@ [PACRET] filecheck-flags: --check-prefixes=PACRET
910
//@ [PAUTHLR_NOP] compile-flags: -Z branch-protection=pac-ret,pc,leaf
11+
//@ [PAUTHLR_NOP] filecheck-flags: --check-prefixes=PAUTHLR_NOP
1012
//@ [PAUTHLR] compile-flags: -C target-feature=+pauth-lr -Z branch-protection=pac-ret,pc,leaf
13+
//@ [PAUTHLR] filecheck-flags: --check-prefixes=PAUTHLR
1114

1215
#![feature(no_core, lang_items)]
1316
#![no_std]

‎tests/assembly-llvm/asm/arm-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//@[d32] compile-flags: -C target-feature=+d32
88
//@[neon] compile-flags: -C target-feature=+neon --cfg d32
99
//@[neon] filecheck-flags: --check-prefix d32
10+
//@[d32] filecheck-flags: --check-prefixes=CHECK,d32
11+
//@[neon] filecheck-flags: --check-prefixes=CHECK,neon
1012
//@ needs-llvm-components: arm
1113

1214
#![feature(no_core, repr_simd, f16)]

‎tests/assembly-llvm/asm/loongarch-type.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
//@[loongarch64] compile-flags: --target loongarch64-unknown-none
1010
//@[loongarch64] needs-llvm-components: loongarch
11+
//@[loongarch64] filecheck-flags: --check-prefixes=CHECK,loongarch64
1112

1213
//@ compile-flags: -Zmerge-functions=disabled
1314

‎tests/assembly-llvm/asm/mips-types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
//@[mips32] needs-llvm-components: mips
66
//@[mips64] compile-flags: --target mips64-unknown-linux-gnuabi64
77
//@[mips64] needs-llvm-components: mips
8+
//@[mips32] filecheck-flags: --check-prefixes=CHECK,mips32
9+
//@[mips64] filecheck-flags: --check-prefixes=CHECK,mips64
810
//@ compile-flags: -Zmerge-functions=disabled
911

1012
#![feature(no_core, asm_experimental_arch)]

‎tests/assembly-llvm/asm/powerpc-types.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44
//@[powerpc] compile-flags: --target powerpc-unknown-linux-gnu
55
//@[powerpc] needs-llvm-components: powerpc
66
//@[powerpc_altivec] compile-flags: --target powerpc-unknown-linux-gnu -C target-feature=+altivec --cfg altivec
7+
//@[powerpc_altivec] filecheck-flags: --check-prefixes=CHECK,powerpc_altivec
78
//@[powerpc_altivec] needs-llvm-components: powerpc
89
//@[powerpc_vsx] compile-flags: --target powerpc-unknown-linux-gnu -C target-feature=+altivec,+vsx --cfg altivec --cfg vsx
10+
//@[powerpc_vsx] filecheck-flags: --check-prefixes=CHECK,powerpc_vsx
911
//@[powerpc_vsx] needs-llvm-components: powerpc
1012
//@[powerpc64] compile-flags: --target powerpc64-unknown-linux-gnu --cfg altivec
13+
//@[powerpc64] filecheck-flags: --check-prefixes=CHECK,powerpc64
1114
//@[powerpc64] needs-llvm-components: powerpc
1215
//@[powerpc64_vsx] compile-flags: --target powerpc64-unknown-linux-gnu -C target-feature=+vsx --cfg altivec --cfg vsx
16+
//@[powerpc64_vsx] filecheck-flags: --check-prefixes=CHECK,powerpc64_vsx
1317
//@[powerpc64_vsx] needs-llvm-components: powerpc
1418
//@ compile-flags: -Zmerge-functions=disabled
1519

‎tests/assembly-llvm/asm/riscv-types.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,28 +4,30 @@
44

55
//@[riscv64] compile-flags: --target riscv64imac-unknown-none-elf
66
//@[riscv64] needs-llvm-components: riscv
7+
//@[riscv64] filecheck-flags: --check-prefixes=CHECK,riscv64
78

89
//@[riscv32] compile-flags: --target riscv32imac-unknown-none-elf
910
//@[riscv32] needs-llvm-components: riscv
1011

1112
//@[riscv64-zfhmin] compile-flags: --target riscv64imac-unknown-none-elf --cfg riscv64
1213
//@[riscv64-zfhmin] needs-llvm-components: riscv
1314
//@[riscv64-zfhmin] compile-flags: -C target-feature=+zfhmin
14-
//@[riscv64-zfhmin] filecheck-flags: --check-prefix riscv64
15+
//@[riscv64-zfhmin] filecheck-flags: --check-prefixes=CHECK,riscv64
1516

1617
//@[riscv32-zfhmin] compile-flags: --target riscv32imac-unknown-none-elf
1718
//@[riscv32-zfhmin] needs-llvm-components: riscv
1819
//@[riscv32-zfhmin] compile-flags: -C target-feature=+zfhmin
20+
//@[riscv32-zfhmin] filecheck-flags: --check-prefixes=CHECK,zfhmin
1921

2022
//@[riscv64-zfh] compile-flags: --target riscv64imac-unknown-none-elf --cfg riscv64
2123
//@[riscv64-zfh] needs-llvm-components: riscv
2224
//@[riscv64-zfh] compile-flags: -C target-feature=+zfh
23-
//@[riscv64-zfh] filecheck-flags: --check-prefix riscv64 --check-prefix zfhmin
25+
//@[riscv64-zfh] filecheck-flags: --check-prefixes=CHECK,riscv64 --check-prefix zfhmin
2426

2527
//@[riscv32-zfh] compile-flags: --target riscv32imac-unknown-none-elf
2628
//@[riscv32-zfh] needs-llvm-components: riscv
2729
//@[riscv32-zfh] compile-flags: -C target-feature=+zfh
28-
//@[riscv32-zfh] filecheck-flags: --check-prefix zfhmin
30+
//@[riscv32-zfh] filecheck-flags: --check-prefixes=CHECK,zfhmin
2931

3032
//@ compile-flags: -C target-feature=+d
3133
//@ compile-flags: -Zmerge-functions=disabled

‎tests/assembly-llvm/asm/s390x-types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//@[s390x] needs-llvm-components: systemz
66
//@[s390x_vector] compile-flags: --target s390x-unknown-linux-gnu -C target-feature=+vector
77
//@[s390x_vector] needs-llvm-components: systemz
8+
//@[s390x_vector] filecheck-flags: --check-prefixes=CHECK,s390x_vector
89
//@ compile-flags: -Zmerge-functions=disabled
910

1011
#![feature(no_core, repr_simd, f128)]

‎tests/assembly-llvm/asm/sparc-types.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//@[sparcv8plus] needs-llvm-components: sparc
88
//@[sparc64] compile-flags: --target sparc64-unknown-linux-gnu
99
//@[sparc64] needs-llvm-components: sparc
10+
//@[sparc64] filecheck-flags: --check-prefixes=CHECK,sparc64
1011
//@ compile-flags: -Zmerge-functions=disabled
1112

1213
#![feature(no_core, asm_experimental_arch)]

‎tests/assembly-llvm/asm/x86-modifiers.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//@[x86_64] needs-llvm-components: x86
77
//@[i686] compile-flags: --target i686-unknown-linux-gnu
88
//@[i686] needs-llvm-components: x86
9+
//@[x86_64] filecheck-flags: --check-prefixes=CHECK,x86_64
10+
//@[i686] filecheck-flags: --check-prefixes=CHECK,i686
911
//@ compile-flags: -C llvm-args=--x86-asm-syntax=intel
1012
//@ compile-flags: -C target-feature=+avx512bw
1113
//@ compile-flags: -Zmerge-functions=disabled

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /