Ignore:
Timestamp:
Sep 13, 2017, 3:11:24 PM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
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:
c57ded70, db70fe4
Parents:
d130fe8 (diff), 982832e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg2:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.h

    rd130fe8 rba54f7d  
    77#include "SynTree/Mutator.h"
    88#include "SynTree/Visitor.h"
     9
     10#include "SymTab/Indexer.h"
    911
    1012#include "SynTree/Initializer.h"
     
    265267
    266268        void set_visit_children( bool& ref ) { bool_ref * ptr = visit_children_impl(pass, 0); if(ptr) ptr->set( ref ); }
     269
     270        void indexerScopeEnter  ()                             { indexer_impl_enterScope  ( pass, 0       ); }
     271        void indexerScopeLeave  ()                             { indexer_impl_leaveScope  ( pass, 0       ); }
     272        void indexerAddId       ( DeclarationWithType * node ) { indexer_impl_addId       ( pass, 0, node ); }
     273        void indexerAddType     ( NamedTypeDecl       * node ) { indexer_impl_addType     ( pass, 0, node ); }
     274        void indexerAddStruct   ( const std::string   & id   ) { indexer_impl_addStruct   ( pass, 0, id   ); }
     275        void indexerAddStruct   ( StructDecl          * node ) { indexer_impl_addStruct   ( pass, 0, node ); }
     276        void indexerAddStructFwd( StructDecl          * node ) { indexer_impl_addStructFwd( pass, 0, node ); }
     277        void indexerAddEnum     ( EnumDecl            * node ) { indexer_impl_addEnum     ( pass, 0, node ); }
     278        void indexerAddUnion    ( const std::string   & id   ) { indexer_impl_addUnion    ( pass, 0, id   ); }
     279        void indexerAddUnion    ( UnionDecl           * node ) { indexer_impl_addUnion    ( pass, 0, node ); }
     280        void indexerAddUnionFwd ( UnionDecl           * node ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
     281        void indexerAddTrait    ( TraitDecl           * node ) { indexer_impl_addTrait    ( pass, 0, node ); }
     282
     283        template< typename TreeType, typename VisitorType >
     284        friend inline void indexerScopedAccept( TreeType * tree, VisitorType &visitor );
     285
     286        template< typename TreeType, typename VisitorType >
     287        friend inline void indexerScopedMutate( TreeType *& tree, VisitorType &visitor );
    267288};
    268289
     
    296317protected:
    297318        WithDeclsToAdd() = default;
    298         ~WithDeclsToAdd() = default;
     319        ~WithDeclsToAdd() {
     320                assert( declsToAddBefore.empty() );
     321        }
    299322
    300323public:
     
    351374};
    352375
     376class WithIndexer {
     377protected:
     378        WithIndexer() {}
     379        ~WithIndexer() {}
     380
     381public:
     382        SymTab::Indexer indexer;
     383};
     384
    353385#include "PassVisitor.impl.h"
Note: See TracChangeset for help on using the changeset viewer.