]> granicus.if.org Git - clang/commitdiff
Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since...
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 25 Jun 2014 04:34:20 +0000 (04:34 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 25 Jun 2014 04:34:20 +0000 (04:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211663 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 11e1e614e4f69485e795b4f1e5bceed040d01462..4ccb86365f608ade17626fc0c9184f5524e39da2 100644 (file)
@@ -6929,8 +6929,8 @@ static void AddLibgcc(const llvm::Triple &Triple, const Driver &D,
     CmdArgs.push_back("-ldl");
 }
 
-static StringRef getLinuxDynamicLinker(const ArgList &Args,
-                                       const toolchains::Linux &ToolChain) {
+static Twine getLinuxDynamicLinker(const ArgList &Args,
+                                   const toolchains::Linux &ToolChain) {
   if (ToolChain.getTriple().getEnvironment() == llvm::Triple::Android) {
     if (ToolChain.getTriple().isArch64Bit())
       return "/system/bin/linker64";
@@ -6964,7 +6964,7 @@ static StringRef getLinuxDynamicLinker(const ArgList &Args,
     return "/lib/ld.so.1";
   } else if (ToolChain.getArch() == llvm::Triple::mips64 ||
              ToolChain.getArch() == llvm::Triple::mips64el) {
-    std::string LinkerFile =
+    Twine LinkerFile =
         mips::isNaN2008(Args) ? "ld-linux-mipsn8.so.1" : "ld.so.1";
     if (mips::hasMipsAbiArg(Args, "n32"))
       return "/lib32/" + LinkerFile;