[llvm] 2306f89 - [lit] Remove unreachable @ expansion code

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 21:50:59 PDT 2023


Author: Fangrui Song
Date: 2023-07-17T21:50:55-07:00
New Revision: 2306f89841ca479ef574e2b68573c32d0fa126ce

URL: https://github.com/llvm/llvm-project/commit/2306f89841ca479ef574e2b68573c32d0fa126ce
DIFF: https://github.com/llvm/llvm-project/commit/2306f89841ca479ef574e2b68573c32d0fa126ce.diff

LOG: [lit] Remove unreachable @ expansion code

ArgumentParser expands @ (fromfile_prefix_chars) by default, so the
expansion code path is unused.

Added: 
    

Modified: 
    llvm/utils/lit/lit/discovery.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/lit/lit/discovery.py b/llvm/utils/lit/lit/discovery.py
index 161a01ad61e6f3..a0a2549d8df997 100644
--- a/llvm/utils/lit/lit/discovery.py
+++ b/llvm/utils/lit/lit/discovery.py
@@ -258,26 +258,11 @@ def find_tests_for_inputs(lit_config, inputs):
     tests to execute.
     """
 
-    # Expand '@...' form in inputs.
-    actual_inputs = []
-    for input in inputs:
-        if input.startswith("@"):
-            f = open(input[1:])
-            try:
-                for ln in f:
-                    ln = ln.strip()
-                    if ln:
-                        actual_inputs.append(ln)
-            finally:
-                f.close()
-        else:
-            actual_inputs.append(input)
-
     # Load the tests from the inputs.
     tests = []
     test_suite_cache = {}
     local_config_cache = {}
-    for input in actual_inputs:
+    for input in inputs:
         prev = len(tests)
         tests.extend(
             getTests(


        


More information about the llvm-commits mailing list