Added debug message to ObjCARC when we transform objc_retainAutorelasedReturnValue => objc_retain since the operand to said function is not a return value.
llvm-svn: 171629
This commit is contained in:
parent
5c32ce9d3e
commit
def07bba3e
|
|
@ -2261,7 +2261,18 @@ ObjCARCOpt::OptimizeRetainRVCall(Function &F, Instruction *RetainRV) {
|
||||||
// Turn it to a plain objc_retain.
|
// Turn it to a plain objc_retain.
|
||||||
Changed = true;
|
Changed = true;
|
||||||
++NumPeeps;
|
++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()));
|
cast<CallInst>(RetainRV)->setCalledFunction(getRetainCallee(F.getParent()));
|
||||||
|
|
||||||
|
DEBUG(dbgs() << " New: "
|
||||||
|
<< *RetainRV << "\n");
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue