Added debug message to ObjCARC when we transform objc_retainAutorelasedReturnValue => objc_retain since the operand to said function is not a return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171629 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman 2013-01-05 17:55:42 +00:00
parent 87a0f02953
commit 36e4bc406c

View File

@ -2261,7 +2261,18 @@ ObjCARCOpt::OptimizeRetainRVCall(Function &F, Instruction *RetainRV) {
// Turn it to a plain objc_retain.
Changed = true;
++NumPeeps;
DEBUG(dbgs() << "ObjCARCOpt::OptimizeRetainRVCall: Transforming "
"objc_retainAutoreleasedReturnValue => "
"objc_retain since the operand is not a return value.\n"
" Old: "
<< *RetainRV << "\n");
cast<CallInst>(RetainRV)->setCalledFunction(getRetainCallee(F.getParent()));
DEBUG(dbgs() << " New: "
<< *RetainRV << "\n");
return false;
}