[cfe-commits] r156498 - /cfe/trunk/lib/Driver/ToolChains.cpp

Chad Rosier mcrosier at apple.com
Wed May 9 11:46:31 PDT 2012


Author: mcrosier
Date: Wed May  9 13:46:30 2012
New Revision: 156498

URL: http://llvm.org/viewvc/llvm-project?rev=156498&view=rev
Log:
Now the proper fix for r156497.  Sorry for the churn.

Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=156498&r1=156497&r2=156498&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed May  9 13:46:30 2012
@@ -59,6 +59,11 @@
   DarwinVersion[0] = Minor + 4;
   DarwinVersion[1] = Micro;
   DarwinVersion[2] = 0;
+
+  // Compute the initial iOS version from the triple
+  getTriple().getiOSVersion(Major, Minor, Micro);
+  llvm::raw_string_ostream(iOSVersionMin)
+    << Major << '.' << Minor << '.' << Micro;
 }
 
 types::ID Darwin::LookupTypeForExtension(const char *Ext) const {
@@ -525,10 +530,6 @@
     // go ahead as assume we're targeting iOS.
     if (OSXTarget.empty() && iOSTarget.empty())
       if (getDarwinArchName(Args) == "armv7") {
-        unsigned Major, Minor, Micro;
-        getTriple().getiOSVersion(Major, Minor, Micro);
-        llvm::raw_string_ostream(iOSVersionMin)
-          << Major << '.' << Minor << '.' << Micro;
         iOSTarget = iOSVersionMin;
       }
 





More information about the cfe-commits mailing list