aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Gottesman <mgottesman@apple.com>2013-01-07 00:04:56 +0000
committerMichael Gottesman <mgottesman@apple.com>2013-01-07 00:04:56 +0000
commitf93109a9b6843fcbe759e69f360b6e079d46c55e (patch)
tree8a655feab031f5adb890063a79f519e55d66ae90
parentfbe4d6b1fa256825ded9d9ebf1b6aeca3d1ff270 (diff)
downloadexternal_llvm-f93109a9b6843fcbe759e69f360b6e079d46c55e.zip
external_llvm-f93109a9b6843fcbe759e69f360b6e079d46c55e.tar.gz
external_llvm-f93109a9b6843fcbe759e69f360b6e079d46c55e.tar.bz2
[ObjCARC Debug Message] - Added debug message when we zap a matching retain/autorelease pair in ObjCARCOpt::OptimizeReturns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171678 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/ObjCARC.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp
index 86b99c9..1c1273c 100644
--- a/lib/Transforms/Scalar/ObjCARC.cpp
+++ b/lib/Transforms/Scalar/ObjCARC.cpp
@@ -3753,6 +3753,9 @@ void ObjCARCOpt::OptimizeReturns(Function &F) {
// If so, we can zap the retain and autorelease.
Changed = true;
++NumRets;
+ DEBUG(dbgs() << "ObjCARCOpt::OptimizeReturns: Erasing: " << *Retain
+ << "\n Erasing: "
+ << *Autorelease << "\n");
EraseInstruction(Retain);
EraseInstruction(Autorelease);
}