[PATCH] D13498: Silence spurious warning from lit about missing clang-interpreter

Richard Barton via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 01:27:48 PDT 2015


richard.barton.arm created this revision.
richard.barton.arm added reviewers: ddunbar, rafael.
richard.barton.arm added a subscriber: cfe-commits.

Clang's lit.cfg checks for the presence of a few test binaries, including the clang-interpreter. This binary is only built if building the clang examples, so the check should also only fire if the clang examples are built.

http://reviews.llvm.org/D13498

Files:
  test/lit.cfg

Index: test/lit.cfg
===================================================================
--- test/lit.cfg
+++ test/lit.cfg
@@ -308,17 +308,21 @@
 NoPostHyphenDot = r"(?!(-|\.))"
 NoPostBar = r"(?!(/|\\))"
 
-for pattern in [r"\bFileCheck\b",
-                r"\bc-index-test\b",
-                NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
-                NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
-                NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot,
-                # FIXME: Some clang test uses opt?
-                NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
-                # Handle these specially as they are strings searched
-                # for during testing.
-                r"\| \bcount\b",
-                r"\| \bnot\b"]:
+tool_patterns = [r"\bFileCheck\b",
+                 r"\bc-index-test\b",
+                 NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
+                 NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
+                 # FIXME: Some clang test uses opt?
+                 NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
+                 # Handle these specially as they are strings searched
+                 # for during testing.
+                 r"\| \bcount\b",
+                 r"\| \bnot\b"]
+
+if config.clang_examples:
+    tool_patterns.append(NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot)
+
+for pattern in tool_patterns:
     # Extract the tool name from the pattern.  This relies on the tool
     # name being surrounded by \b word match operators.  If the
     # pattern starts with "| ", include it in the string to be


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13498.36712.patch
Type: text/x-patch
Size: 1689 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151007/7d8c7799/attachment.bin>


More information about the cfe-commits mailing list