From 23a55f1eeeb15ef6b8002e98e90cd025d53c97f2 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Sun, 21 Dec 2014 07:00:00 +0000 Subject: Reapply "Change -save-temps to emit unoptimized bitcode files." This reapplies r224503 along with a fix for compiling Fortran by having the clang driver invoke gcc (see r224546, where it was reverted). I have added a testcase for that as well. Original commit message: 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: 224688 --- clang/lib/Driver/ToolChain.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/Driver/ToolChain.cpp') 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(); } -- cgit v1.1