Index: llvm/trunk/utils/lit/lit/llvm/config.py =================================================================== --- llvm/trunk/utils/lit/lit/llvm/config.py +++ llvm/trunk/utils/lit/lit/llvm/config.py @@ -223,12 +223,13 @@ return True if re.match(r'^x86_64.*-apple', triple): - version_number = int( - re.search(r'version ([0-9]+)\.', version_string).group(1)) + 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)) if 'Apple LLVM' in version_string: - return version_number >= 9 + return major_version_number >= 9 and minor_version_number > 0 else: - return version_number >= 5 + return major_version_number >= 5 return False