Added debug message to ObjCARC when we transform an objc_autoreleaseReturnValue => objc_autorelease due to its operand not being used as a return value.
llvm-svn: 171669
This commit is contained in:
parent
4f1c7256f9
commit
1bf6908867
|
|
@ -2298,8 +2298,20 @@ ObjCARCOpt::OptimizeAutoreleaseRVCall(Function &F, Instruction *AutoreleaseRV) {
|
|||
|
||||
Changed = true;
|
||||
++NumPeeps;
|
||||
|
||||
DEBUG(dbgs() << "ObjCARCOpt::OptimizeAutoreleaseRVCall: Transforming "
|
||||
"objc_autoreleaseReturnValue => "
|
||||
"objc_autorelease since its operand is not used as a return "
|
||||
"value.\n"
|
||||
" Old: "
|
||||
<< *AutoreleaseRV << "\n");
|
||||
|
||||
cast<CallInst>(AutoreleaseRV)->
|
||||
setCalledFunction(getAutoreleaseCallee(F.getParent()));
|
||||
|
||||
DEBUG(dbgs() << " New: "
|
||||
<< *AutoreleaseRV << "\n");
|
||||
|
||||
}
|
||||
|
||||
/// OptimizeIndividualCalls - Visit each call, one at a time, and make
|
||||
|
|
|
|||
Loading…
Reference in New Issue