forked from OSchip/llvm-project
[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. llvm-svn: 319656
This commit is contained in:
parent
98775c5055
commit
64774bafff
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue