Fix -save-temp when using objc-arc, sanitizer and profiling
authorSteven Wu <stevenwu@apple.com>
Fri, 17 Jul 2015 20:09:56 +0000 (20:09 +0000)
committerSteven Wu <stevenwu@apple.com>
Fri, 17 Jul 2015 20:09:56 +0000 (20:09 +0000)
commit546a19628bc0d1e1e6b2f50d029df4b08e64dfa5
treede33d42a65db7410c59f7987a5f2ff2c873eb8db
parent76c2f2c9dae885fd51971ba8d3b9709355adeade
Fix -save-temp when using objc-arc, sanitizer and profiling

Currently, -save-temp will cause ObjCARC optimization to be dropped,
sanitizer pass to run early in the pipeline, and profiling
instrumentation to run twice.
Fix the issue by properly disable all passes in the optimization
pipeline when generating bitcode output and parse some of the Language
Options even when the input is bitcode so the passes can be setup
correctly.

llvm-svn: 242565
clang/include/clang/Driver/CC1Options.td
clang/include/clang/Frontend/CodeGenOptions.def
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/Tools.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/sanitize-address-field-padding.cpp
clang/test/CodeGenObjC/arc.ll [new file with mode: 0644]
clang/test/Driver/save-temps.c