Simplify.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94503 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index 89478d5..82fdf82 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -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.
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index 61b4ee6..edacafa 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -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,