]> granicus.if.org Git - clang/commitdiff
[Driver] Delete last reference of lld -flavor old-gnu
authorFangrui Song <maskray@google.com>
Tue, 28 Aug 2018 17:20:28 +0000 (17:20 +0000)
committerFangrui Song <maskray@google.com>
Tue, 28 Aug 2018 17:20:28 +0000 (17:20 +0000)
This is dead code because lld -flavor old-gnu was removed in 2016 by rLLD262158.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340845 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/Gnu.cpp

index d2f1a0ceb82f2c2fb141956dd2c39ba3605513b1..9e24a6317659f377d73f206b8d5903cff8bf7d92 100644 (file)
@@ -323,14 +323,6 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   // handled somewhere else.
   Args.ClaimAllArgs(options::OPT_w);
 
-  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
-  if (llvm::sys::path::stem(Exec) == "lld") {
-    CmdArgs.push_back("-flavor");
-    CmdArgs.push_back("old-gnu");
-    CmdArgs.push_back("-target");
-    CmdArgs.push_back(Args.MakeArgString(getToolChain().getTripleString()));
-  }
-
   if (!D.SysRoot.empty())
     CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
 
@@ -539,6 +531,7 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
   AddHIPLinkerScript(getToolChain(), C, Output, Inputs, Args, CmdArgs, JA,
                      *this);
 
+  const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
   C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs, Inputs));
 }