[PATCH] D48383: [Dominators] Add the DomTreeUpdater class

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 29 11:27:48 PDT 2018


kuhar added inline comments.


================
Comment at: lib/IR/DomTreeUpdater.cpp:34
+  const bool HasEdge = llvm::any_of(
+      successors(From), [To](const BasicBlock *B) { return B == To; });
+
----------------
NutshellySima wrote:
> kuhar wrote:
> > Still missed? Can we use llvm::find here?
> It was commented when I used `std::any_of` last time. I then switched to `llvm::any_of`. I believe `llvm::any_of` is clearer than `llvm::find` because after `llvm::find` returns an iterator, and I need to have it compared with the `succ_end` to find out the value of this boolean.
OK


https://reviews.llvm.org/D48383





More information about the llvm-commits mailing list