Skip to content

Commit

Permalink
Added debug message to ObjCARC when we transform an objc_autoreleaseR…
Browse files Browse the repository at this point in the history
…eturnValue => 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
  • Loading branch information
gottesmm committed Jan 6, 2013
1 parent f564a93 commit 48239c7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/Transforms/Scalar/ObjCARC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 48239c7

Please sign in to comment.