diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-12-04 14:01:34 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-12-04 14:01:34 +0000 |
commit | e0e7476d4c235eaf849da694115ddc23f36c1ed8 (patch) | |
tree | 72aa4566a55fb89921b3d3406653b8afb405fbaa /utils | |
parent | 9d9981028dddec4c227cfce9feccbb66fbc1aa41 (diff) |
[NFC][lit] Use proper semantic versioning names for variables
The variable named `minor` was actually pointing to the patch part of
the version. While I was changing this I also made the check for Apple
clang more robust by checking both patch and minor rather than just
minor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319656 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/lit/lit/llvm/config.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utils/lit/lit/llvm/config.py b/utils/lit/lit/llvm/config.py index e3be929d716..3c9a2cc559c 100644 --- a/utils/lit/lit/llvm/config.py +++ b/utils/lit/lit/llvm/config.py @@ -225,9 +225,10 @@ class LLVMConfig(object): if re.match(r'^x86_64.*-apple', triple): version_regex = re.search(r'version ([0-9]+)\.([0-9]+).([0-9]+)', version_string) major_version_number = int(version_regex.group(1)) - minor_version_number = int(version_regex.group(3)) + minor_version_number = int(version_regex.group(2)) + patch_version_number = int(version_regex.group(3)) if 'Apple LLVM' in version_string: - return major_version_number >= 9 and minor_version_number > 0 + return major_version_number >= 9 and (minor_version_number > 0 or patch_version_number > 0) else: return major_version_number >= 5 |