]> granicus.if.org Git - clang/commit
Change -save-temps to emit unoptimized bitcode files.
authorBob Wilson <bob.wilson@apple.com>
Thu, 18 Dec 2014 06:08:26 +0000 (06:08 +0000)
committerBob Wilson <bob.wilson@apple.com>
Thu, 18 Dec 2014 06:08:26 +0000 (06:08 +0000)
commit23cf9d557e2396291b461c7c16a889fc97fa25a3
tree76a583b0c3bc94e7321da70fe6df78ceead30304
parentf96fd4c68e89695cc64686bcf0dc768aee4638e5
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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224503 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/clang/Driver/Action.h
include/clang/Driver/Phases.h
lib/Driver/Action.cpp
lib/Driver/Driver.cpp
lib/Driver/Phases.cpp
lib/Driver/ToolChain.cpp
lib/Driver/Tools.cpp
lib/Driver/Types.cpp
test/Driver/ast.c
test/Driver/darwin-dsymutil.c
test/Driver/darwin-verify-debug.c
test/Driver/lto.c
test/Driver/phases.c
test/Driver/save-temps.c