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

llvm-svn: 171673
This commit is contained in:
Michael Gottesman 2013-01-06 22:56:50 +00:00
parent fec61c018d
commit a6a1dadeab
1 changed files with 8 additions and 0 deletions

View File

@ -2425,6 +2425,14 @@ void ObjCARCOpt::OptimizeIndividualCalls(Function &F) {
Call->getArgOperand(0), "", Call);
NewCall->setMetadata(ImpreciseReleaseMDKind,
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);
Inst = NewCall;
Class = IC_Release;