diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2011-05-05 00:08:20 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2011-05-05 00:08:20 +0000 |
commit | 3dc05418538c719fea48b906bfa4febe5296e126 (patch) | |
tree | 687d5784fa052acf5afcc1c73477daea9c8c7489 /lib/Driver/Tools.cpp | |
parent | c1598700010cea9364a58a65e967b0b56361b6aa (diff) |
Preserve the full name of the file, so that '-c -o foo.pic.o' produces
foo.pic.gcno instead of foo.gcno.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index f4e0f2e359..239edb5db4 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1306,12 +1306,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (C.getArgs().hasArg(options::OPT_c) || C.getArgs().hasArg(options::OPT_S)) { if (Output.isFilename()) { - llvm::StringRef CoverageDir = - llvm::sys::path::parent_path(Output.getFilename()); - if (!CoverageDir.empty()) { - CmdArgs.push_back("-coverage-dir"); - CmdArgs.push_back(Args.MakeArgString(CoverageDir)); - } + CmdArgs.push_back("-coverage-file"); + CmdArgs.push_back(Args.MakeArgString(Output.getFilename())); } } |