[cfe-commits] r129834 - in /cfe/trunk/lib: Basic/Targets.cpp Driver/ToolChains.cpp

Daniel Dunbar daniel at zuster.org
Tue Apr 19 16:34:18 PDT 2011


Author: ddunbar
Date: Tue Apr 19 18:34:17 2011
New Revision: 129834

URL: http://llvm.org/viewvc/llvm-project?rev=129834&view=rev
Log:
Driver/Darwin: Switch to using -macosx for OS name in triples.

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

Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=129834&r1=129833&r2=129834&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Tue Apr 19 18:34:17 2011
@@ -127,13 +127,9 @@
         Min = Maj - 4;
         Maj = 10;
       }
-    } else if (Triple.getOS() == llvm::Triple::OSX) {
-      Triple.getOSVersion(Maj, Min, Rev);
-      PlatformName = "macosx";
     } else {
-      assert(Triple.getOS() == llvm::Triple::IOS && "unexpected triple!");
       Triple.getOSVersion(Maj, Min, Rev);
-      PlatformName = "ios";
+      PlatformName = Triple.getOSName();
     }
   }
 

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=129834&r1=129833&r2=129834&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Tue Apr 19 18:34:17 2011
@@ -151,7 +151,7 @@
   
   llvm::SmallString<16> Str;
   llvm::raw_svector_ostream(Str)
-    << (isTargetIPhoneOS() ? "ios" : "osx")
+    << (isTargetIPhoneOS() ? "ios" : "macosx")
     << Version[0] << "." << Version[1] << "." << Version[2];
   Triple.setOSName(Str.str());
 





More information about the cfe-commits mailing list