[PM] Rename the IR printing pass header to a more generic and correct
[oota-llvm.git] / test / lit.cfg
index 171186ea502f15613351b1f8b0eb0f6809738ebc..251dbe0966c204d31a7515aca8a2de74c3b2d1ca 100644 (file)
@@ -224,15 +224,16 @@ for pattern in [r"\bbugpoint\b(?!-)",
                 r"\bllvm-link\b",
                 r"\bllvm-lto\b",
                 r"\bllvm-mc\b",
+                r"\bllvm-mcmarkup\b",
                 r"\bllvm-nm\b",
                 r"\bllvm-objdump\b",
-                r"\bllvm-prof\b",
                 r"\bllvm-ranlib\b",
                 r"\bllvm-readobj\b",
                 r"\bllvm-rtdyld\b",
                 r"\bllvm-shlib\b",
                 r"\bllvm-size\b",
                 r"\bllvm-tblgen\b",
+                r"\bllvm-c-test\b",
                 # Match llvmc but not -llvmc
                 NOHYPHEN + r"\bllvmc\b",
                 # Match lto but not -lto
@@ -244,6 +245,8 @@ for pattern in [r"\bbugpoint\b(?!-)",
                 r"\bFileUpdate\b",
                 r"\bc-index-test\b",
                 r"\bfpcmp\b",
+                r"\bobj2yaml\b",
+                r"\byaml2obj\b",
                 # Handle these specially as they are strings searched
                 # for during testing.
                 r"\| \bcount\b",
@@ -297,21 +300,24 @@ if config.have_zlib == "1":
     config.available_features.add("zlib")
 
 # Native compilation: host arch == target arch
-if config.host_arch in config.target_triple:
+# FIXME: Consider cases that target can be executed
+# even if host_triple were different from target_triple.
+if config.host_triple == config.target_triple:
     config.available_features.add("native")
 
-# llc knows whether he is compiled with -DNDEBUG.
+# Ask llvm-config about assertion mode.
 import subprocess
 try:
-    llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
-                           stdout = subprocess.PIPE)
+    llvm_config_cmd = subprocess.Popen(
+        [os.path.join(llvm_tools_dir, 'llvm-config'), '--assertion-mode'],
+        stdout = subprocess.PIPE)
 except OSError:
-    print("Could not find llc in " + llvm_tools_dir)
+    print("Could not find llvm-config in " + llvm_tools_dir)
     exit(42)
 
-if re.search(r'with assertions', llc_cmd.stdout.read().decode('ascii')):
+if re.search(r'ON', llvm_config_cmd.stdout.read().decode('ascii')):
     config.available_features.add('asserts')
-llc_cmd.wait()
+llvm_config_cmd.wait()
 
 if 'darwin' == sys.platform:
     try: