forked from OSchip/llvm-project
Fix an oversight: don't run ARC optimization cleanup at -O0.
llvm-svn: 154052
This commit is contained in:
parent
d7290700e6
commit
1170b0885f
|
@ -382,7 +382,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
|
|||
// Add ObjC ARC final-cleanup optimizations. This is done as part of the
|
||||
// "codegen" passes so that it isn't run multiple times when there is
|
||||
// inlining happening.
|
||||
if (LangOpts.ObjCAutoRefCount)
|
||||
if (LangOpts.ObjCAutoRefCount &&
|
||||
CodeGenOpts.OptimizationLevel > 0)
|
||||
PM->add(createObjCARCContractPass());
|
||||
|
||||
if (TM->addPassesToEmitFile(*PM, OS, CGFT,
|
||||
|
|
Loading…
Reference in New Issue