Changeset 5e298d7 for src


Ignore:
Timestamp:
Jun 20, 2017, 1:52:37 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
0508ab3
Parents:
6a0d1b1e
git-author:
Rob Schluntz <rschlunt@…> (06/20/17 13:47:49)
git-committer:
Rob Schluntz <rschlunt@…> (06/20/17 13:52:37)
Message:

added some documentation for PassVisitor? features

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r6a0d1b1e r5e298d7  
    1818// Templated visitor type
    1919// To use declare a PassVisitor< YOUR VISITOR TYPE >
    20 // The visitor type should specify the previsit/postvisit for types that are desired.
     20// The visitor type should specify the previsit/postvisit/premutate/postmutate for types that are desired.
     21//
     22// Several additional features are available through inheritance
     23// | WithTypeSubstitution - provides polymorphic TypeSubstitution * env for the current expression
     24// | WithStmtsToAdd       - provides the ability to insert statements before or after the current statement by adding new statements into
     25//                          stmtsToAddBefore or stmtsToAddAfter respectively.
     26// | WithShortCircuiting  - provides the ability to skip visiting child nodes; set skip_children to true if pre{visit,mutate} to skip visiting children
     27// | WithScopes           - provides the ability to save/restore data like a LIFO stack; to save, call GuardValue with the variable to save, the variable
     28//                          will automatically be restored to its previous value after the corresponding postvisit/postmutate teminates.
    2129//-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    2230template< typename pass_type >
Note: See TracChangeset for help on using the changeset viewer.