From f93109a9b6843fcbe759e69f360b6e079d46c55e Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Mon, 7 Jan 2013 00:04:56 +0000 Subject: [PATCH] [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 --- lib/Transforms/Scalar/ObjCARC.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 86b99c9eb15..1c1273ca379 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); }