FLANG
Classes | Public Member Functions | List of all members
Fortran::evaluate::rewrite::Mutator< Rewriter > Struct Template Reference

#include <flang/Evaluate/rewrite.h>

Public Member Functions

 Mutator (Rewriter &rewriter)
 
template<typename T , typename U = llvm::remove_cvref_t<T>>
operator() (T &&x)
 

Detailed Description

template<typename Rewriter>
struct Fortran::evaluate::rewrite::Mutator< Rewriter >

Bottom-up Expr<T> rewriter.

The Mutator traverses and reconstructs given Expr<T>. Going bottom-up, whenever the traversal visits a sub-node of type Expr (for some U), it will invoke the user-provided rewriter via the () operator.

If x is of type Expr, it will call (in pseudo-code): rewriter_(x, active_member_of(x.u)) The second parameter is there to make it easier to overload the () operator for specific operations in Expr<...>.

The user rewriter is only invoked for Expr, not for Operation, nor any other subobject.


The documentation for this struct was generated from the following file: