aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2013-02-22 01:33:46 +0000
committerEric Christopher <echristo@gmail.com>2013-02-22 01:33:46 +0000
commit5704d34444ecd7e1baa90026fb36c47207e0a3b7 (patch)
treeb86be2cb8ae282c93d7f308097d2638a34fe7dbe /lib/Driver/Tools.cpp
parentf0b1a0ee4787cd60a34951950baa6dd7d3d53a64 (diff)
Make sure we only use the output file as a base for debug splitting
if we're compiling. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175851 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index e830bdcc9c..ebbabcfdf9 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -1723,7 +1723,7 @@ void Clang::SplitDebugInfo(Compilation &C, const JobAction &JA,
// Add an output for the extract.
Arg *FinalOutput = C.getArgs().getLastArg(options::OPT_o);
const char *OutFile;
- if (FinalOutput) {
+ if (FinalOutput && C.getArgs().hasArg(options::OPT_c)) {
SmallString<128> T(FinalOutput->getValue());
llvm::sys::path::replace_extension(T, "dwo");
OutFile = Args.MakeArgString(T);