about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPietro Albini <pietro.albini@ferrous-systems.com>2023-03-16 10:19:14 +0100
committerPietro Albini <pietro.albini@ferrous-systems.com>2023-04-03 09:30:36 +0200
commit60f2761503143937102f37e7ec07ecf2b5b2923e (patch)
treeb48280b6161f504ddb0217bf3021ae1170fec5a1
parent54c4762a86e4c278f8aa97d7136997cd77d4ede7 (diff)
add support for ignore-llvm-version
-rw-r--r--src/tools/compiletest/src/header/cfg.rs22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/tools/compiletest/src/header/cfg.rs b/src/tools/compiletest/src/header/cfg.rs
index e1931474a5f..ffb81dfdcdb 100644
--- a/src/tools/compiletest/src/header/cfg.rs
+++ b/src/tools/compiletest/src/header/cfg.rs
@@ -171,14 +171,22 @@ pub(super) fn parse_cfg_name_directive<'a>(
         message: "when comparing with {name}",
     }
 
-    // Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest.
-    if prefix == "ignore" && name.starts_with("tidy-") && outcome == MatchOutcome::Invalid {
-        outcome = MatchOutcome::External;
-    }
+    if prefix == "ignore" && outcome == MatchOutcome::Invalid {
+        // Don't error out for ignore-tidy-* diretives, as those are not handled by compiletest.
+        if name.starts_with("tidy-") {
+            outcome = MatchOutcome::External;
+        }
 
-    // Don't error out for ignore-pass, as that is handled elsewhere.
-    if prefix == "ignore" && name == "pass" && outcome == MatchOutcome::Invalid {
-        outcome = MatchOutcome::External;
+        // Don't error out for ignore-pass, as that is handled elsewhere.
+        if name == "pass" {
+            outcome = MatchOutcome::External;
+        }
+
+        // Don't error out for ignore-llvm-version, that has a custom syntax and is handled
+        // elsewhere.
+        if name == "llvm-version" {
+            outcome = MatchOutcome::External;
+        }
     }
 
     ParsedNameDirective {