diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -1364,15 +1364,13 @@ """ Returns a string that represents the compiler version. Supports: llvm, clang. """ - version = 'unknown' - compiler = self.getCompilerBinary() - version_output = system([[compiler, "-v"]]) + version_output = system([[compiler, "--version"]]) for line in version_output.split(os.linesep): - m = re.search('version ([0-9\.]+)', line) + m = re.search('version ([0-9.]+)', line) if m: - version = m.group(1) - return version + return m.group(1) + return 'unknown' def getDwarfVersion(self): """ Returns the dwarf version generated by clang or '0'. """