Skip to content

Commit 37ecede

Browse files
authored
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 87dbdd2 (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.
2 parents 809e975 + 3035816 commit 37ecede

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/tools/compiletest/src/runtest.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -2327,7 +2327,11 @@ impl<'test> TestCx<'test> {
23272327
// For now, though…
23282328
if let Some(rev) = self.revision {
23292329
let prefixes = format!("CHECK,{}", rev);
2330-
filecheck.args(&["--check-prefixes", &prefixes]);
2330+
if self.config.llvm_version.unwrap_or(0) >= 130000 {
2331+
filecheck.args(&["--allow-unused-prefixes", "--check-prefixes", &prefixes]);
2332+
} else {
2333+
filecheck.args(&["--check-prefixes", &prefixes]);
2334+
}
23312335
}
23322336
self.compose_and_run(filecheck, "", None, None)
23332337
}

0 commit comments

Comments
 (0)