From: Michael Gottesman Date: Sun, 6 Jan 2013 22:56:50 +0000 (+0000) Subject: Added debug statement to ObjCARC when we replace objc_autorelease(x) with objc_releas... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20d9fff206ebb21d08f61783462ca56d5efe0af9;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 43f95191c6a..3a4e78ba2e4 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -2425,6 +2425,14 @@ void ObjCARCOpt::OptimizeIndividualCalls(Function &F) { Call->getArgOperand(0), "", Call); NewCall->setMetadata(ImpreciseReleaseMDKind, MDNode::get(C, ArrayRef())); + + 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;