================
@@ -149,6 +219,26 @@ class FactEntry : public CapabilityExpr {
   bool declared() const { return Source == Declared; }
   bool managed() const { return Source == Managed; }
 
+  bool tryHeld() const { return TryLock.getInt(); }
+  const Expr *tryLockCall() const { return TryLock.getPointer(); }
+
+  /// Whether the capability is definitely held at least once: it is not
+  /// try-held, or only the top level of a reentrant acquisition is
+  /// conditional while the levels below it are definite.
+  virtual bool definitelyHeld() const { return !tryHeld(); }
+
+  /// The fact's reentrancy depth; only lockable facts can be reentrant.
----------------
aaronpuchert wrote:

That begs the question: why is this a virtual function on `FactEntry`, instead 
of only a function on `LockableFactEntry`?

https://github.com/llvm/llvm-project/pull/220635
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to