diff options
author | Eric Christopher <echristo@gmail.com> | 2013-02-22 01:33:46 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2013-02-22 01:33:46 +0000 |
commit | 77569ffd0617b583e40c3e685a8b3f193ede7514 (patch) | |
tree | 729cc6c63359c28a1ec9f6d5c4936be81716a0a9 /clang/lib/Driver/Tools.cpp | |
parent | ac2d082f58e61aa9424cbe778677f61109cf7392 (diff) | |
download | bcm5719-llvm-77569ffd0617b583e40c3e685a8b3f193ede7514.tar.gz bcm5719-llvm-77569ffd0617b583e40c3e685a8b3f193ede7514.zip |
Make sure we only use the output file as a base for debug splitting
if we're compiling.
llvm-svn: 175851
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index e830bdcc9c3..ebbabcfdf9c 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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); |