Fix -fobjc-arc doesn't work with -save-temps
authorSteven Wu <stevenwu@apple.com>
Sat, 2 May 2015 00:56:15 +0000 (00:56 +0000)
committerSteven Wu <stevenwu@apple.com>
Sat, 2 May 2015 00:56:15 +0000 (00:56 +0000)
commit1d56be869e76a0408f13759f32a898e7fddc5146
tree6308e1f5d911958ee6c86d338f0a1e589b6dba26
parent40055d118548c00f144ef73f947d764e9b6057bc
Fix -fobjc-arc doesn't work with -save-temps

The underlying problem is that there is currently no way to run
ObjCARCContract from llvm bitcode which is required by ObjC ARC.
This fix the problem by always enable ObjCARCContract pass if
optimization is enabled. The ObjCARC Contract pass has almost no
overhead on code that is not using ARC.

llvm-svn: 236372
clang/lib/CodeGen/BackendUtil.cpp