[cfe-commits] r94503 - in /cfe/trunk/lib/Driver: ToolChains.h Tools.cpp
Daniel Dunbar
daniel at zuster.org
Mon Jan 25 19:56:40 PST 2010
Author: ddunbar
Date: Mon Jan 25 21:56:40 2010
New Revision: 94503
URL: http://llvm.org/viewvc/llvm-project?rev=94503&view=rev
Log:
Simplify.
Modified:
cfe/trunk/lib/Driver/ToolChains.h
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/lib/Driver/ToolChains.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.h?rev=94503&r1=94502&r2=94503&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.h (original)
+++ cfe/trunk/lib/Driver/ToolChains.h Mon Jan 25 21:56:40 2010
@@ -67,8 +67,6 @@
/// The default iphoneos-version-min of this tool chain.
std::string IPhoneOSVersionMin;
- const char *getMacosxVersionMin() const;
-
public:
Darwin(const HostInfo &Host, const llvm::Triple& Triple,
const unsigned (&DarwinVersion)[3], bool IsIPhoneOS);
@@ -112,14 +110,6 @@
return isMacosxVersionLT(A, B);
}
- const char *getMacosxVersionStr() const {
- return MacosxVersionMin.c_str();
- }
-
- const char *getIPhoneOSVersionStr() const {
- return IPhoneOSVersionMin.c_str();
- }
-
/// AddLinkSearchPathArgs - Add the linker search paths to \arg CmdArgs.
///
/// \param Args - The input argument list.
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=94503&r1=94502&r2=94503&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Mon Jan 25 21:56:40 2010
@@ -1948,20 +1948,11 @@
Args.AddAllArgs(CmdArgs, options::OPT_image__base);
Args.AddAllArgs(CmdArgs, options::OPT_init);
- if (!Args.hasArg(options::OPT_mmacosx_version_min_EQ) &&
- !Args.hasArg(options::OPT_miphoneos_version_min_EQ)) {
- // Add default version min.
- if (!getDarwinToolChain().isIPhoneOS()) {
- CmdArgs.push_back("-macosx_version_min");
- CmdArgs.push_back(getDarwinToolChain().getMacosxVersionStr());
- } else {
- CmdArgs.push_back("-iphoneos_version_min");
- CmdArgs.push_back(getDarwinToolChain().getIPhoneOSVersionStr());
- }
- }
-
- // Adding all arguments doesn't make sense here but this is what
- // gcc does.
+ // Adding all arguments doesn't make sense here but this is what gcc does. One
+ // of this should always be present thanks to argument translation.
+ assert((Args.hasArg(options::OPT_mmacosx_version_min_EQ) ||
+ Args.hasArg(options::OPT_miphoneos_version_min_EQ)) &&
+ "Missing version argument (lost in translation)?");
Args.AddAllArgsTranslated(CmdArgs, options::OPT_mmacosx_version_min_EQ,
"-macosx_version_min");
Args.AddAllArgsTranslated(CmdArgs, options::OPT_miphoneos_version_min_EQ,
More information about the cfe-commits
mailing list