diff options
author | James Farrell <jamesfarrell@google.com> | 2021-12-01 16:54:32 +0000 |
---|---|---|
committer | James Farrell <jamesfarrell@google.com> | 2021-12-06 14:57:47 +0000 |
commit | 50324670342d9391f62671685f4d6b4880a4ea9a (patch) | |
tree | 8a8577a53dce03f12da6d1f7f61434677da657ac /clang/lib/ARCMigrate | |
parent | 2ae50118275b45a2c435e9e64acc3aa4a5a571b0 (diff) | |
download | llvm-50324670342d9391f62671685f4d6b4880a4ea9a.zip llvm-50324670342d9391f62671685f4d6b4880a4ea9a.tar.gz llvm-50324670342d9391f62671685f4d6b4880a4ea9a.tar.bz2 |
Use VersionTuple for parsing versions in Triple, fixing issues that caused the original change to be reverted. This makes it possible to distinguish between "16" and "16.0" after parsing, which previously was not possible.
This reverts commit 40d5eeac6cd89a2360c3ba997cbaa816abca828c.
Differential Revision: https://reviews.llvm.org/D114885
Diffstat (limited to 'clang/lib/ARCMigrate')
-rw-r--r-- | clang/lib/ARCMigrate/ARCMT.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp index 4851c43..68ee7c5 100644 --- a/clang/lib/ARCMigrate/ARCMT.cpp +++ b/clang/lib/ARCMigrate/ARCMT.cpp @@ -162,9 +162,7 @@ static bool HasARCRuntime(CompilerInvocation &origCI) { return triple.getOSMajorVersion() >= 11; if (triple.getOS() == llvm::Triple::MacOSX) { - unsigned Major, Minor, Micro; - triple.getOSVersion(Major, Minor, Micro); - return Major > 10 || (Major == 10 && Minor >= 7); + return triple.getOSVersion() >= VersionTuple(10, 7); } return false; |