From 715f6a62a17f1e26a7c3f673b70bf44c99ae7cae Mon Sep 17 00:00:00 2001 From: Michael Gottesman Date: Fri, 4 Jan 2013 21:30:38 +0000 Subject: [PATCH] Added DEBUG message to ObjCARC when we optimize objc_retain => objc_retainAutorelasedReturnValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171535 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/ObjCARC.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index c280cf43583..1e9b08e736d 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -2199,7 +2199,17 @@ ObjCARCOpt::OptimizeRetainCall(Function &F, Instruction *Retain) { // Turn it to an objc_retainAutoreleasedReturnValue.. Changed = true; ++NumPeeps; + + DEBUG(dbgs() << "ObjCARCOpt::OptimizeRetainCall: Transforming " + "objc_retainAutoreleasedReturnValue => " + "objc_retain since the operand is not a return value.\n" + " Old: " + << *Retain << "\n"); + cast(Retain)->setCalledFunction(getRetainRVCallee(F.getParent())); + + DEBUG(dbgs() << " New: " + << *Retain << "\n"); } /// OptimizeRetainRVCall - Turn objc_retainAutoreleasedReturnValue into