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

Gabor Greif ggreif at gmail.com
Wed Apr 18 03:59:08 PDT 2012


Author: ggreif
Date: Wed Apr 18 05:59:08 2012
New Revision: 154997

URL: http://llvm.org/viewvc/llvm-project?rev=154997&view=rev
Log:
fix GCC version comparison wrt. equal patch suffices (and squash two typos)

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=154997&r1=154996&r2=154997&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Apr 18 05:59:08 2012
@@ -580,7 +580,7 @@
 
     // If no '-miphoneos-version-min' specified on the command line and
     // IPHONEOS_DEPLOYMENT_TARGET is not defined, see if we can set the default
-    // based on isysroot.
+    // based on -isysroot.
     if (iOSTarget.empty()) {
       if (const Arg *A = Args.getLastArg(options::OPT_isysroot)) {
         StringRef first, second;
@@ -1086,6 +1086,7 @@
   // a patch.
   if (RHS.Patch == -1) return true;   if (Patch == -1) return false;
   if (Patch < RHS.Patch) return true; if (Patch > RHS.Patch) return false;
+  if (PatchSuffix == RHS.PatchSuffix) return false;
 
   // Finally, between completely tied version numbers, the version with the
   // suffix loses as we prefer full releases.
@@ -2063,7 +2064,7 @@
     // If the GCC installation we found is inside of the sysroot, we want to
     // prefer libraries installed in the parent prefix of the GCC installation.
     // It is important to *not* use these paths when the GCC installation is
-    // outside of the system root as that can pick up un-intented libraries.
+    // outside of the system root as that can pick up unintended libraries.
     // This usually happens when there is an external cross compiler on the
     // host system, and a more minimal sysroot available that is the target of
     // the cross.





More information about the cfe-commits mailing list