[Lldb-commits] [lldb] [lldb] Remove python helper getCompilerBinary() (PR #100660)

Kendal Harland via lldb-commits lldb-commits at lists.llvm.org
Fri Jul 26 10:41:32 PDT 2024


https://github.com/kendalharland updated https://github.com/llvm/llvm-project/pull/100660

>From 6769752234f67ac693ea7345393fd9d72fa4a567 Mon Sep 17 00:00:00 2001
From: kendal <kendal at thebrowser.company>
Date: Thu, 25 Jul 2024 14:59:25 -0700
Subject: [PATCH] [lldb][test] Remove getCompilerBinary() helper

---
 .../packages/Python/lldbsuite/test/lldbplatformutil.py | 10 +++-------
 lldb/packages/Python/lldbsuite/test/lldbtest.py        |  4 ----
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
index e3c6fd1a99568..602e15d207e94 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py
@@ -266,17 +266,13 @@ def getCompiler():
     return module.getCompiler()
 
 
-def getCompilerBinary():
-    """Returns the compiler binary the test suite is running with."""
-    return getCompiler().split()[0]
-
-
 def getCompilerVersion():
     """Returns a string that represents the compiler version.
     Supports: llvm, clang.
     """
-    compiler = getCompilerBinary()
-    version_output = subprocess.check_output([compiler, "--version"], errors="replace")
+    version_output = subprocess.check_output(
+        [getCompiler(), "--version"], errors="replace"
+    )
     m = re.search("version ([0-9.]+)", version_output)
     if m:
         return m.group(1)
diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py
index 5e50b0c145885..f97c41d867e78 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -1379,10 +1379,6 @@ def getCompiler(self):
         """Returns the compiler in effect the test suite is running with."""
         return lldbplatformutil.getCompiler()
 
-    def getCompilerBinary(self):
-        """Returns the compiler binary the test suite is running with."""
-        return lldbplatformutil.getCompilerBinary()
-
     def getCompilerVersion(self):
         """Returns a string that represents the compiler version.
         Supports: llvm, clang.



More information about the lldb-commits mailing list