Added debug message to ObjCARC when we transform an objc_autoreleaseReturnValue => objc_autorelease due to its operand not being used as a return value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171669 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman 2013-01-06 21:07:11 +00:00
parent f564a9389d
commit 48239c753a

View File

@ -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