[PATCH] D23146: [ADT] Migrate DepthFirstIterator to use NodeRef

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 4 16:25:02 PDT 2016


timshen marked 3 inline comments as done.

================
Comment at: include/llvm/ADT/DepthFirstIterator.h:114-117
@@ -115,3 +113,6 @@
+
+      for (NodeRef Next : make_range(*Opt, GT::child_end(Node))) {
         // Has our next sibling been visited?
-        if (Next && this->Visited.insert(Next).second) {
+        if (this->Visited.insert(Next).second) {
           // No, do it now.
+          VisitStack.push_back(StackElement(Next, None));
----------------
Oops I already fixed it. I don't think that it's a functional change, but just a modernization.


https://reviews.llvm.org/D23146





More information about the llvm-commits mailing list