about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAugie Fackler <augie@google.com>2021-05-17 13:08:42 -0400
committerAugie Fackler <augie@google.com>2021-05-17 13:08:42 -0400
commit3035816fc13c2ae30d46849bfcceec085a2f47e2 (patch)
treeab8a8dab0d8b4d174b79bfefb153169d17361f01
parentf429ab3c18fe47a5cc116f2c4daaa24a740f3511 (diff)
downloadrust-3035816fc13c2ae30d46849bfcceec085a2f47e2.tar.gz
rust-3035816fc13c2ae30d46849bfcceec085a2f47e2.zip
runtest: correctly guard against LLVM version 13
-rw-r--r--src/tools/compiletest/src/runtest.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 517ae9c4dff..80d905c730f 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2293,7 +2293,11 @@ impl<'test> TestCx<'test> {
         // For now, though…
         if let Some(rev) = self.revision {
             let prefixes = format!("CHECK,{}", rev);
-            filecheck.args(&["--allow-unused-prefixes", "--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)
     }