r199431 - Remove an unnecessary special case to check for a few Darwin-specific options.

Bob Wilson bob.wilson at apple.com
Thu Jan 16 13:50:37 PST 2014


Author: bwilson
Date: Thu Jan 16 15:50:37 2014
New Revision: 199431

URL: http://llvm.org/viewvc/llvm-project?rev=199431&view=rev
Log:
Remove an unnecessary special case to check for a few Darwin-specific options.

Using -mmacosx-version-min (etc.) on non-Darwin platforms should be a warning,
not a hard error. There is no reason to add a special check for these options
in the default toolchain. This just removes the special check and then we get
the usual -Wunused-command-line-argument warning if someone tries to use one
of these options for a target where they are not supported.
<rdar://problem/15569346>

Modified:
    cfe/trunk/lib/Driver/ToolChain.cpp

Modified: cfe/trunk/lib/Driver/ToolChain.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChain.cpp?rev=199431&r1=199430&r2=199431&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChain.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChain.cpp Thu Jan 16 15:50:37 2014
@@ -221,13 +221,6 @@ std::string ToolChain::ComputeLLVMTriple
 
 std::string ToolChain::ComputeEffectiveClangTriple(const ArgList &Args, 
                                                    types::ID InputType) const {
-  // Diagnose use of Darwin OS deployment target arguments on non-Darwin.
-  if (Arg *A = Args.getLastArg(options::OPT_mmacosx_version_min_EQ,
-                               options::OPT_miphoneos_version_min_EQ,
-                               options::OPT_mios_simulator_version_min_EQ))
-    getDriver().Diag(diag::err_drv_clang_unsupported)
-      << A->getAsString(Args);
-
   return ComputeLLVMTriple(Args, InputType);
 }
 





More information about the cfe-commits mailing list