Kill every call to @clang.arc.use in the ARC contract phase.
[oota-llvm.git] / lib / Transforms / ObjCARC / ObjCARCContract.cpp
index 1c13d1cbea42ba3150565717a2ac89114a862e61..5d0865e8bea2bf6dad3edc05e5c2489437c7640e 100644 (file)
@@ -453,6 +453,10 @@ bool ObjCARCContract::runOnFunction(Function &F) {
       if (isa<AllocaInst>(Inst))
         TailOkForStoreStrongs = false;
       continue;
+    case IC_IntrinsicUser:
+      // Remove calls to @clang.arc.use(...).
+      Inst->eraseFromParent();
+      continue;
     default:
       continue;
     }