[cfe-commits] r81387 - /cfe/trunk/lib/Driver/Tools.cpp

Daniel Dunbar daniel at zuster.org
Wed Sep 9 15:32:41 PDT 2009


Author: ddunbar
Date: Wed Sep  9 17:32:41 2009
New Revision: 81387

URL: http://llvm.org/viewvc/llvm-project?rev=81387&view=rev
Log:
Use Twine concatenation instead of llvm::format.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=81387&r1=81386&r2=81387&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Sep  9 17:32:41 2009
@@ -1704,25 +1704,22 @@
     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) {





More information about the cfe-commits mailing list