diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2021-05-18 22:35:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-18 22:35:59 -0400 |
| commit | 37ecede50758eaf42372d7ec4b653ea06d8ee160 (patch) | |
| tree | d99e0c58e643e663d0411900b23d5dfeb061db6a | |
| parent | 809e975bbf3afdab0552519d75e91d18077626ce (diff) | |
| parent | 3035816fc13c2ae30d46849bfcceec085a2f47e2 (diff) | |
| download | rust-37ecede50758eaf42372d7ec4b653ea06d8ee160.tar.gz rust-37ecede50758eaf42372d7ec4b653ea06d8ee160.zip | |
Rollup merge of #84883 - durin42:allow-unused-prefixes, r=nikic
compiletest: "fix" FileCheck with --allow-unused-prefixes The default of --allow-unused-prefixes used to be false, but in LLVM change 87dbdd2e3b (https://reviews.llvm.org/D95849) the default became true. I'm not quite sure how we could do better here (specifically not providing the CHECK prefix when it's not needed), but this seems to work for now. This reduces codegen test failures against LLVM HEAD from 31 cases to 5.
| -rw-r--r-- | src/tools/compiletest/src/runtest.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index f4e16483d8c..54b079a3e86 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2327,7 +2327,11 @@ impl<'test> TestCx<'test> { // For now, though… if let Some(rev) = self.revision { let prefixes = format!("CHECK,{}", rev); - filecheck.args(&["--check-prefixes", &prefixes]); + if self.config.llvm_version.unwrap_or(0) >= 130000 { + filecheck.args(&["--allow-unused-prefixes", "--check-prefixes", &prefixes]); + } else { + filecheck.args(&["--check-prefixes", &prefixes]); + } } self.compose_and_run(filecheck, "", None, None) } |
