r238797 - [Basic] Transition getEnvironmentVersion from getOSVersion for android

David Majnemer david.majnemer at gmail.com
Mon Jun 1 16:38:25 PDT 2015


Author: majnemer
Date: Mon Jun  1 18:38:25 2015
New Revision: 238797

URL: http://llvm.org/viewvc/llvm-project?rev=238797&view=rev
Log:
[Basic] Transition getEnvironmentVersion from getOSVersion for android

'android' occupies the environment component of the triple.  Let's use
getEnvironmentVersion to extract it instead of getOSVersion.

Modified:
    cfe/trunk/lib/Basic/Targets.cpp

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=238797&r1=238796&r2=238797&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Mon Jun  1 18:38:25 2015
@@ -389,7 +389,7 @@ protected:
     if (Triple.getEnvironment() == llvm::Triple::Android) {
       Builder.defineMacro("__ANDROID__", "1");
       unsigned Maj, Min, Rev;
-      Triple.getOSVersion(Maj, Min, Rev);
+      Triple.getEnvironmentVersion(Maj, Min, Rev);
       this->PlatformName = "android";
       this->PlatformMinVersion = VersionTuple(Maj, Min, Rev);
     }





More information about the cfe-commits mailing list