[PM/AA] Run clang-format over the ObjCARC Alias Analysis code to
[oota-llvm.git] / lib / Transforms / ObjCARC / DependencyAnalysis.h
index 77e4bdf5021095bbeab419e72b71c6ef6f479e6b..8e042d47ee6e5ba9b09ee2093146ed1a2c7cad5d 100644 (file)
@@ -71,6 +71,17 @@ bool CanUse(const Instruction *Inst, const Value *Ptr, ProvenanceAnalysis &PA,
 bool CanAlterRefCount(const Instruction *Inst, const Value *Ptr,
                       ProvenanceAnalysis &PA, ARCInstKind Class);
 
+/// Returns true if we can not conservatively prove that Inst can not decrement
+/// the reference count of Ptr. Returns false if we can.
+bool CanDecrementRefCount(const Instruction *Inst, const Value *Ptr,
+                          ProvenanceAnalysis &PA, ARCInstKind Class);
+
+static inline bool CanDecrementRefCount(const Instruction *Inst,
+                                        const Value *Ptr,
+                                        ProvenanceAnalysis &PA) {
+  return CanDecrementRefCount(Inst, Ptr, PA, GetARCInstKind(Inst));
+}
+
 } // namespace objcarc
 } // namespace llvm