From: NAKAMURA Takumi Date: Wed, 25 Jun 2014 04:34:20 +0000 (+0000) Subject: Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d706ede5483a198a60f7d435d1898dcca6222d91;p=clang Tools.cpp: Update getLinuxDynamicLinker() to return Twine instead of StringRef, since r211598 has introduced manipulation of return string. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211663 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 11e1e614e4..4ccb86365f 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -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;