aboutsummaryrefslogtreecommitdiff
path: root/lib
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 /lib
parentfbe4d6b1fa256825ded9d9ebf1b6aeca3d1ff270 (diff)
[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
Diffstat (limited to 'lib')
-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 86b99c9eb1..1c1273ca37 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);
}