Ignore:
Timestamp:
Jun 16, 2017, 3:22:50 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
f522618
Parents:
7bd712d
Message:

Added base clases for passes to improve ease of use of the pass visitor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r7bd712d r4eb31f2b  
    258258        ~WithTypeSubstitution() = default;
    259259
     260public:
    260261        TypeSubstitution * env;
    261 
    262         template<typename pass_type>
    263         friend class PassVisitor< pass_type>;
    264262};
    265263
     
    269267        ~WithStmtsToAdd() = default;
    270268
     269public:
    271270        std::list< Statement* > stmtsToAddBefore;
    272271        std::list< Statement* > stmtsToAddAfter;
    273 
    274         template<typename pass_type>
    275         friend class PassVisitor< pass_type>;
    276272};
    277273
     
    281277        ~WithShortCircuiting() = default;
    282278
     279public:
    283280        bool skip_children;
    284 
    285         template<typename pass_type>
    286         friend class PassVisitor< pass_type>;
    287281};
    288282
     
    292286        ~WithScopes() = default;
    293287
     288public:
    294289        at_cleanup_t at_cleanup;
    295290
     291        template< typename T >
    296292        void GuardValue( T& val ) {
    297293                at_cleanup( [ val ]( void * newVal ) {
     
    299295                }, static_cast< void * >( & val ) );
    300296        }
    301 
    302         template<typename pass_type>
    303         friend class PassVisitor< pass_type>;
    304297};
    305298
Note: See TracChangeset for help on using the changeset viewer.