[Driver] NFC: Use Twine temp to replace std::string local
authorHubert Tong <hubert.reinterpretcast@gmail.com>
Sun, 31 May 2020 20:38:10 +0000 (16:38 -0400)
committerHubert Tong <hubert.reinterpretcast@gmail.com>
Sun, 31 May 2020 20:38:10 +0000 (16:38 -0400)
This patch replaces a `std::string` local used for a concatentation with
a `Twine` where the string was being passed into call.

clang/lib/Driver/ToolChains/Gnu.cpp

index 9a34014..ac9eb46 100644 (file)
@@ -449,10 +449,9 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA,
       CmdArgs.push_back("-export-dynamic");
 
     if (!Args.hasArg(options::OPT_shared) && !IsStaticPIE) {
-      const std::string Loader =
-          D.DyldPrefix + ToolChain.getDynamicLinker(Args);
       CmdArgs.push_back("-dynamic-linker");
-      CmdArgs.push_back(Args.MakeArgString(Loader));
+      CmdArgs.push_back(Args.MakeArgString(Twine(D.DyldPrefix) +
+                                           ToolChain.getDynamicLinker(Args)));
     }
   }