Implement major new fastisel functionality: the matcher can now handle immediates...
[oota-llvm.git] / test / lit.cfg
index 21b0a48be9f1179aa21b7c5d38c791fa71d4509e..9a2f74c21c93f368feffef976de0427ef8b97045 100644 (file)
@@ -175,8 +175,12 @@ for sub in ['llvmgcc', 'llvmgxx', 'emitir', 'compile_cxx', 'compile_c',
 # (llvm_tools_dir in lit parlance).
                 # Don't match 'bugpoint-' or 'clang-'.
                                         # Don't match '/clang'.
+if os.pathsep == ';':
+    pathext = os.environ.get('PATHEXT', '').split(';')
+else:
+    pathext = ['']
 for pattern in [r"\bbugpoint\b(?!-)",   r"(?<!/)\bclang\b(?!-)",
-                r"\bedis\b",            r"\bgold\b",
+                r"\bgold\b",
                 r"\bllc\b",             r"\blli\b",
                 r"\bllvm-ar\b",         r"\bllvm-as\b",
                 r"\bllvm-bcanalyzer\b", r"\bllvm-config\b",
@@ -204,6 +208,11 @@ for pattern in [r"\bbugpoint\b(?!-)",   r"(?<!/)\bclang\b(?!-)",
     substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
                           r"\2" + llvm_tools_dir + "/" + r"\4",
                           pattern)
+    for ext in pathext:
+        substitution_ext = substitution + ext
+        if os.path.exists(substitution_ext):
+             substitution = substitution_ext
+             break
     config.substitutions.append((pattern, substitution))
 
 excludes = []