Changeset 447c356 for src/Common


Ignore:
Timestamp:
Oct 19, 2017, 11:15:35 AM (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:
6fc5c14
Parents:
84733c1
git-author:
Rob Schluntz <rschlunt@…> (10/17/17 10:25:17)
git-committer:
Rob Schluntz <rschlunt@…> (10/19/17 11:15:35)
Message:

Add support for TypeSubstitution? in PassVisitor?

Location:
src/Common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    r84733c1 r447c356  
    238238        virtual Attribute * mutate( Attribute * attribute ) override final;
    239239
     240        virtual TypeSubstitution * mutate( TypeSubstitution * sub ) final;
     241
    240242private:
    241243        template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
  • src/Common/PassVisitor.impl.h

    r84733c1 r447c356  
    21272127        MUTATE_BODY( Attribute, node );
    21282128}
     2129
     2130template< typename pass_type >
     2131TypeSubstitution * PassVisitor< pass_type >::mutate( TypeSubstitution * node ) {
     2132        MUTATE_START( node );
     2133
     2134        for ( auto & p : node->typeEnv ) {
     2135                indexerScopedMutate( p.second, *this );
     2136        }
     2137        for ( auto & p : node->varEnv ) {
     2138                indexerScopedMutate( p.second, *this );
     2139        }
     2140
     2141        MUTATE_END( TypeSubstitution, node );
     2142}
Note: See TracChangeset for help on using the changeset viewer.