From b617a9f3c7cb5bf139259515f4f14ba221ace13a Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 9 Sep 2009 22:32:41 +0000 Subject: [PATCH] Use Twine concatenation instead of llvm::format. llvm-svn: 81387 --- clang/lib/Driver/Tools.cpp | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 31b6cb5a4572..9cbca9a7631e 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -1704,25 +1704,22 @@ void darwin::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-lgomp"); // FIXME: Derive these correctly. - const char *TCDir = getDarwinToolChain().getToolChainDir().c_str(); + llvm::StringRef TCDir = getDarwinToolChain().getToolChainDir(); if (getToolChain().getArchName() == "x86_64") { - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s/x86_64", TCDir))); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir + + "/x86_64")); // Intentionally duplicated for (temporary) gcc bug compatibility. - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s/x86_64", TCDir))); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir + + "/x86_64")); } - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/%s", TCDir))); - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s", TCDir))); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/" + TCDir)); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir)); // Intentionally duplicated for (temporary) gcc bug compatibility. - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s", TCDir))); - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s/../../../%s", TCDir, TCDir))); - CmdArgs.push_back(MakeFormattedString(Args, - llvm::format("-L/usr/lib/gcc/%s/../../..", TCDir))); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir)); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir + + "/../../../" + TCDir)); + CmdArgs.push_back(Args.MakeArgString("-L/usr/lib/gcc/" + TCDir + + "/../../..")); for (InputInfoList::const_iterator it = Inputs.begin(), ie = Inputs.end(); it != ie; ++it) {