[ObjCARC Debug Message] - Added debug message when we erase ARC calls with null since...
[oota-llvm.git] / lib / Transforms / Scalar / ObjCARC.cpp
index c840e6e4c8c481016e4f20912b72830c7bbd968d..86b99c9eb159b66e6eed5cd71c850aaed2d38799 100644 (file)
@@ -2452,6 +2452,8 @@ void ObjCARCOpt::OptimizeIndividualCalls(Function &F) {
     // Set nounwind as needed.
     if (IsNoThrow(Class)) {
       Changed = true;
+      DEBUG(dbgs() << "ObjCARCOpt::OptimizeIndividualCalls: Found no throw"
+            " class. Setting nounwind on: " << *Inst << "\n");
       cast<CallInst>(Inst)->setDoesNotThrow();
     }
 
@@ -2466,6 +2468,8 @@ void ObjCARCOpt::OptimizeIndividualCalls(Function &F) {
     if (isNullOrUndef(Arg)) {
       Changed = true;
       ++NumNoops;
+      DEBUG(dbgs() << "ObjCARCOpt::OptimizeIndividualCalls: ARC calls with "
+            " null are no-ops. Erasing: " << *Inst << "\n");
       EraseInstruction(Inst);
       continue;
     }