r175706 - Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
Nick Lewycky
nicholas at mxc.ca
Wed Feb 20 18:02:50 PST 2013
Author: nicholas
Date: Wed Feb 20 20:02:50 2013
New Revision: 175706
URL: http://llvm.org/viewvc/llvm-project?rev=175706&view=rev
Log:
Respect -fno-canonical-prefixes when deciding where to generate .gcno and .gcda
files.
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=175706&r1=175705&r2=175706&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Wed Feb 20 20:02:50 2013
@@ -2292,9 +2292,13 @@ void Clang::ConstructJob(Compilation &C,
C.getArgs().hasArg(options::OPT_S)) {
if (Output.isFilename()) {
CmdArgs.push_back("-coverage-file");
- SmallString<128> absFilename(Output.getFilename());
- llvm::sys::fs::make_absolute(absFilename);
- CmdArgs.push_back(Args.MakeArgString(absFilename));
+ 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));
+ }
}
}
More information about the cfe-commits
mailing list