forked from OSchip/llvm-project
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:
parent
fec61c018d
commit
a6a1dadeab
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue