diff options
author | Michael Gottesman <mgottesman@apple.com> | 2013-01-06 22:56:50 +0000 |
---|---|---|
committer | Michael Gottesman <mgottesman@apple.com> | 2013-01-06 22:56:50 +0000 |
commit | 20d9fff206ebb21d08f61783462ca56d5efe0af9 (patch) | |
tree | d437748664bf3c9b60f316b5d5d862ae2672e88c /lib/Transforms/Scalar | |
parent | e549492c3680814b31058b183d315d69fd9293de (diff) | |
download | external_llvm-20d9fff206ebb21d08f61783462ca56d5efe0af9.zip external_llvm-20d9fff206ebb21d08f61783462ca56d5efe0af9.tar.gz external_llvm-20d9fff206ebb21d08f61783462ca56d5efe0af9.tar.bz2 |
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
Diffstat (limited to 'lib/Transforms/Scalar')
-rw-r--r-- | lib/Transforms/Scalar/ObjCARC.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 43f9519..3a4e78b 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<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; |