Skip to content
Commit 85838720 authored by Richard Smith's avatar Richard Smith
Browse files

Use data recursion in RecursiveASTVisitor when traversing Stmt and Expr nodes.

When RAV traverses a Stmt or Expr node, if the corresponding Traverse*
functions have not been overridden, it will now use data recursion to walk
those nodes. We arrange this to be an unobservable optimization to RAV
subclasses, and to gracefully degrade as parts of the visitation are overridden
with functions that might observe the visitation.

For instance, if an RAV subclass overrides TraverseUnaryNot, we will ensure
that there are real recursive stack frames for those traversals, but we'll
use data recursion for all other traversals.

This removes the need for DataRecursiveASTVisitor, and for the
'shouldUseDataRecursionFor' extension point, both of which are removed by this
change.

llvm-svn: 253948
parent d977f4ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment