[cfe-commits] r154052 - /cfe/trunk/lib/CodeGen/BackendUtil.cpp
Dan Gohman
gohman at apple.com
Wed Apr 4 14:04:57 PDT 2012
Author: djg
Date: Wed Apr 4 16:04:56 2012
New Revision: 154052
URL: http://llvm.org/viewvc/llvm-project?rev=154052&view=rev
Log:
Fix an oversight: don't run ARC optimization cleanup at -O0.
Modified:
cfe/trunk/lib/CodeGen/BackendUtil.cpp
Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=154052&r1=154051&r2=154052&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Wed Apr 4 16:04:56 2012
@@ -382,7 +382,8 @@
// 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,
More information about the cfe-commits
mailing list