r175839 - Make logic smaller.

Eric Christopher echristo at gmail.com
Thu Feb 21 16:24:40 PST 2013


Author: echristo
Date: Thu Feb 21 18:24:40 2013
New Revision: 175839

URL: http://llvm.org/viewvc/llvm-project?rev=175839&view=rev
Log:
Make logic smaller.

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=175839&r1=175838&r2=175839&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Feb 21 18:24:40 2013
@@ -2335,13 +2335,10 @@ void Clang::ConstructJob(Compilation &C,
       C.getArgs().hasArg(options::OPT_S)) {
     if (Output.isFilename()) {
       CmdArgs.push_back("-coverage-file");
-      if (C.getArgs().hasArg(options::OPT_no_canonical_prefixes)) {
-        CmdArgs.push_back(Args.MakeArgString(Output.getFilename()));
-      } else {
-        SmallString<128> absFilename(Output.getFilename());
-        llvm::sys::fs::make_absolute(absFilename);
-        CmdArgs.push_back(Args.MakeArgString(absFilename));
-      }
+      SmallString<128> CoverageFilename(Output.getFilename());
+      if (!C.getArgs().hasArg(options::OPT_no_canonical_prefixes))
+        llvm::sys::fs::make_absolute(CoverageFilename);
+      CmdArgs.push_back(Args.MakeArgString(CoverageFilename));
     }
   }
 





More information about the cfe-commits mailing list