dberlin added a subscriber: dberlin. dberlin added a comment. Do you actually use Visited outside of the iterator (It's not visible in this patch if you do)? If not, you should just use depth_first, not depth_first_ext. http://reviews.llvm.org/D12046