[llvm] [Support][NFC] Use DomTreeBase methods in SemiNCA (PR #101059)

Jakub Kuderski via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 13:02:58 PDT 2024


================
@@ -695,7 +695,8 @@ class DominatorTreeBase {
       assert(I != IDom->Children.end() &&
              "Not in immediate dominator children set!");
       // I am no longer your child...
-      IDom->Children.erase(I);
+      std::swap(*I, IDom->Children.back());
----------------
kuhar wrote:

Nice catch!

https://github.com/llvm/llvm-project/pull/101059


More information about the llvm-commits mailing list