================ @@ -235,6 +266,20 @@ class FactSet { return false; } + std::optional<FactID> replaceLock(FactManager &FM, iterator It, + std::unique_ptr<FactEntry> Entry) { + if (It == end()) + return std::nullopt; + FactID F = FM.newFact(std::move(Entry)); + *It = F; + return F; + } + + std::optional<FactID> replaceLock(FactManager &FM, const CapabilityExpr &CapE, + std::unique_ptr<FactEntry> Entry) { + return replaceLock(FM, findLockIter(FM, CapE), std::move(Entry)); + } + ---------------- aaronpuchert wrote:
Can't we just use `removeLock` and then `addLock`? https://github.com/llvm/llvm-project/pull/137133 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits