Added debug statement to ObjCARC when we replace objc_autorelease(x) with objc_release(x) when x is otherwise unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171673 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael Gottesman 2013-01-06 22:56:50 +00:00
parent e549492c36
commit 20d9fff206

View File

@ -2425,6 +2425,14 @@ void ObjCARCOpt::OptimizeIndividualCalls(Function &F) {
Call->getArgOperand(0), "", Call); Call->getArgOperand(0), "", Call);
NewCall->setMetadata(ImpreciseReleaseMDKind, NewCall->setMetadata(ImpreciseReleaseMDKind,
MDNode::get(C, ArrayRef<Value *>())); MDNode::get(C, ArrayRef<Value *>()));
DEBUG(dbgs() << "ObjCARCOpt::OptimizeIndividualCalls: Replacing "
"objc_autorelease(x) with objc_release(x) since x is "
"otherwise unused.\n"
" Old: " << *Call
"\n New: " <<
*NewCall << "\n");
EraseInstruction(Call); EraseInstruction(Call);
Inst = NewCall; Inst = NewCall;
Class = IC_Release; Class = IC_Release;