[libcxx-commits] [libcxx] 0256413 - [libc++] NFC: Minor cleanups in config.py

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 14 05:28:17 PDT 2020


Author: Louis Dionne
Date: 2020-04-14T08:28:05-04:00
New Revision: 025641342b952b699684aeaee4a383af83f18d4d

URL: https://github.com/llvm/llvm-project/commit/025641342b952b699684aeaee4a383af83f18d4d
DIFF: https://github.com/llvm/llvm-project/commit/025641342b952b699684aeaee4a383af83f18d4d.diff

LOG: [libc++] NFC: Minor cleanups in config.py

Remove mentions of the ValgrindExecutor, which doesn't exist. That
executor is literally nowhere in the code base, so this is dead code
as far as we're concerned.

Also, inline a one-liner function that was called exactly once.

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 5268e560329c..a328a6aeaeee 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -112,11 +112,6 @@ def check_value(value, var_name):
             return check_value(val, env_var)
         return check_value(conf_val, name)
 
-    def get_modules_enabled(self):
-        return self.get_lit_bool('enable_modules',
-                                default=False,
-                                env_var='LIBCXX_ENABLE_MODULES')
-
     def make_static_lib_name(self, name):
         """Return the full filename for the specified library name"""
         if self.target_info.is_windows():
@@ -192,20 +187,12 @@ def configure_executor(self):
         if te:
             self.lit_config.note("Using executor: %r" % exec_str)
             if self.lit_config.useValgrind:
-                # We have no way of knowing where in the chain the
-                # ValgrindExecutor is supposed to go. It is likely
-                # that the user wants it at the end, but we have no
-                # way of getting at that easily.
-                self.lit_config.fatal("Cannot infer how to create a Valgrind "
-                                      " executor.")
+                self.lit_config.fatal("The libc++ test suite can't run under Valgrind with a custom executor")
         else:
             te = LocalExecutor()
-            if self.lit_config.useValgrind:
-                te = ValgrindExecutor(self.lit_config.valgrindArgs, te)
 
         te.target_info = self.target_info
         self.target_info.executor = te
-
         self.executor = te
 
     def configure_target_info(self):
@@ -993,7 +980,8 @@ def configure_modules(self):
         if not self.target_info.is_darwin():
             modules_flags += ['-Xclang', '-fmodules-local-submodule-visibility']
         supports_modules = self.cxx.hasCompileFlag(modules_flags)
-        enable_modules = self.get_modules_enabled()
+        enable_modules = self.get_lit_bool('enable_modules', default=False,
+                                                             env_var='LIBCXX_ENABLE_MODULES')
         if enable_modules and not supports_modules:
             self.lit_config.fatal(
                 '-fmodules is enabled but not supported by the compiler')


        


More information about the libcxx-commits mailing list