aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/ToolChain.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-12-18 06:08:26 +0000
committerBob Wilson <bob.wilson@apple.com>2014-12-18 06:08:26 +0000
commitf5ba8288ad715d59361704f48bfc0f4a6ded998b (patch)
treefb0c4674ed19784b9f1cf2cf0a4c25829b171eac /clang/lib/Driver/ToolChain.cpp
parent3a23917d48806270f0c8de083fd29d7354ad1e15 (diff)
downloadllvm-f5ba8288ad715d59361704f48bfc0f4a6ded998b.zip
llvm-f5ba8288ad715d59361704f48bfc0f4a6ded998b.tar.gz
llvm-f5ba8288ad715d59361704f48bfc0f4a6ded998b.tar.bz2
Change -save-temps to emit unoptimized bitcode files.
It is often convenient to use -save-temps to collect the intermediate results of a compilation, e.g., when triaging a bug report. Besides the temporary files for preprocessed source and assembly code, this adds the unoptimized bitcode files as well. This adds a new BackendJobAction, which is mostly mechanical, to run after the CompileJobAction. When not using -save-temps, the BackendJobAction is combined into one job with the CompileJobAction, similar to the way the integrated assembler is handled. I've implemented this entirely as a driver change, so under the hood, it is just using -disable-llvm-optzns to get the unoptimized bitcode. Based in part on a patch by Steven Wu. rdar://problem/18909437 llvm-svn: 224503
Diffstat (limited to 'clang/lib/Driver/ToolChain.cpp')
-rw-r--r--clang/lib/Driver/ToolChain.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
index 6734ce7..2bcfecf 100644
--- a/clang/lib/Driver/ToolChain.cpp
+++ b/clang/lib/Driver/ToolChain.cpp
@@ -129,6 +129,7 @@ Tool *ToolChain::getTool(Action::ActionClass AC) const {
case Action::AnalyzeJobClass:
case Action::MigrateJobClass:
case Action::VerifyPCHJobClass:
+ case Action::BackendJobClass:
return getClang();
}