[cfe-commits] r84781 - /cfe/trunk/lib/Driver/ToolChains.cpp
Benjamin Kramer
benny.kra at googlemail.com
Wed Oct 21 14:05:07 PDT 2009
Author: d0k
Date: Wed Oct 21 16:05:07 2009
New Revision: 84781
URL: http://llvm.org/viewvc/llvm-project?rev=84781&view=rev
Log:
Driver: don't produce bogus osx version numbers if no version (aka 0) was specified.
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=84781&r1=84780&r2=84781&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Wed Oct 21 16:05:07 2009
@@ -38,7 +38,8 @@
DarwinVersion[2] = _DarwinVersion[2];
llvm::raw_string_ostream(MacosxVersionMin)
- << "10." << DarwinVersion[0] - 4 << '.' << DarwinVersion[1];
+ << "10." << std::max(0, (int)DarwinVersion[0] - 4) << '.'
+ << DarwinVersion[1];
// FIXME: Lift default up.
IPhoneOSVersionMin = "3.0";
More information about the cfe-commits
mailing list