From: Bob Wilson Date: Tue, 14 Jan 2014 01:56:31 +0000 (+0000) Subject: Remove a temporary workaround that is no longer relevant. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dc25150d905a819c898d0abd7d16326c792e7c9e;p=clang Remove a temporary workaround that is no longer relevant. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199176 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 489c6ba4b5..492b2ce62f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -4780,27 +4780,10 @@ void darwin::Link::AddLinkArgs(Compilation &C, << A->getAsString(Args); } - // Newer linkers support -demangle, pass it if supported and not disabled by + // Newer linkers support -demangle. Pass it if supported and not disabled by // the user. - if (Version[0] >= 100 && !Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) { - // Don't pass -demangle to ld_classic. - // - // FIXME: This is a temporary workaround, ld should be handling this. - bool UsesLdClassic = (getToolChain().getArch() == llvm::Triple::x86 && - Args.hasArg(options::OPT_static)); - if (getToolChain().getArch() == llvm::Triple::x86) { - for (arg_iterator it = Args.filtered_begin(options::OPT_Xlinker, - options::OPT_Wl_COMMA), - ie = Args.filtered_end(); it != ie; ++it) { - const Arg *A = *it; - for (unsigned i = 0, e = A->getNumValues(); i != e; ++i) - if (StringRef(A->getValue(i)) == "-kext") - UsesLdClassic = true; - } - } - if (!UsesLdClassic) - CmdArgs.push_back("-demangle"); - } + if (Version[0] >= 100 && !Args.hasArg(options::OPT_Z_Xlinker__no_demangle)) + CmdArgs.push_back("-demangle"); if (Args.hasArg(options::OPT_rdynamic) && Version[0] >= 137) CmdArgs.push_back("-export_dynamic");