diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-01-31 22:32:29 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-01-31 22:32:29 +0000 |
commit | bda59fdd71033a8ddfa30ec4b514753017f3da5c (patch) | |
tree | da934da5f8fe784ca9772a8f8d5b4c5a6cfeb9db /include | |
parent | ed2d17b2d4ae20a83304357d6c84ed10e88bc036 (diff) |
Add Triple::getMacOSXVersion to replace crufty code in the clang driver.
This new function provides a way to get the Mac OS X version number from
either generic "darwin" triples of macosx triples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149438 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ADT/Triple.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/ADT/Triple.h b/include/llvm/ADT/Triple.h index 6299e14192..eabb7c3f58 100644 --- a/include/llvm/ADT/Triple.h +++ b/include/llvm/ADT/Triple.h @@ -209,6 +209,13 @@ public: return Maj; } + /// getMacOSXVersion - Parse the version number as with getOSVersion and then + /// translate generic "darwin" versions to the corresponding OS X versions. + /// This may also be called with IOS triples but the OS X version number is + /// just set to a constant 10.4.0 in that case. Returns true if successful. + bool getMacOSXVersion(unsigned &Major, unsigned &Minor, + unsigned &Micro) const; + /// @} /// @name Direct Component Access /// @{ |