From: Michael Gottesman Date: Thu, 3 Jan 2013 07:32:53 +0000 (+0000) Subject: Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1ebbdcfa1fb353caa773be9c769b17211c1e4d8a;p=oota-llvm.git Added DEBUG message to ObjCARC when we transform objc_initWeak(p, null) => *p = null. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171463 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 13d2060a752..32019334e44 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -4168,6 +4168,10 @@ bool ObjCARCContract::runOnFunction(Function &F) { ConstantPointerNull::get(cast(CI->getType())); Changed = true; new StoreInst(Null, CI->getArgOperand(0), CI); + + DEBUG(dbgs() << "OBJCARCContract: Old = " << *CI << "\n" + << " New = " << *Null << "\n"); + CI->replaceAllUsesWith(Null); CI->eraseFromParent(); }