[llvm] r319656 - [NFC][lit] Use proper semantic versioning names for variables
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 4 06:01:34 PST 2017
Author: jdevlieghere
Date: Mon Dec 4 06:01:34 2017
New Revision: 319656
URL: http://llvm.org/viewvc/llvm-project?rev=319656&view=rev
Log:
[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.
Modified:
llvm/trunk/utils/lit/lit/llvm/config.py
Modified: llvm/trunk/utils/lit/lit/llvm/config.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/llvm/config.py?rev=319656&r1=319655&r2=319656&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/llvm/config.py (original)
+++ llvm/trunk/utils/lit/lit/llvm/config.py Mon Dec 4 06:01:34 2017
@@ -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
More information about the llvm-commits
mailing list