llvm.org GIT mirror llvm / e0e7476
[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 Jonas Devlieghere 1 year, 11 months ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
224224 if re.match(r'^x86_64.*-apple', triple):
225225 version_regex = re.search(r'version ([0-9]+)\.([0-9]+).([0-9]+)', version_string)
226226 major_version_number = int(version_regex.group(1))
227 minor_version_number = int(version_regex.group(3))
227 minor_version_number = int(version_regex.group(2))
228 patch_version_number = int(version_regex.group(3))
228229 if 'Apple LLVM' in version_string:
229 return major_version_number >= 9 and minor_version_number > 0
230 return major_version_number >= 9 and (minor_version_number > 0 or patch_version_number > 0)
230231 else:
231232 return major_version_number >= 5
232233