Ignore:
Timestamp:
Jul 12, 2019, 5:42:33 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
ce12e2b
Parents:
6f096d2
Message:

Const PassVisitor? now supports the indexer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Common/PassVisitor.proto.h

    r6f096d2 re3d7f9f  
    229229
    230230
    231 INDEXER_FUNC1( addId     , DeclarationWithType *       );
    232 INDEXER_FUNC1( addType   , NamedTypeDecl *             );
    233 INDEXER_FUNC1( addStruct , StructDecl *                );
    234 INDEXER_FUNC1( addEnum   , EnumDecl *                  );
    235 INDEXER_FUNC1( addUnion  , UnionDecl *                 );
    236 INDEXER_FUNC1( addTrait  , TraitDecl *                 );
    237 INDEXER_FUNC2( addWith   , std::list< Expression * > &, BaseSyntaxNode * );
     231INDEXER_FUNC1( addId     , const DeclarationWithType *       );
     232INDEXER_FUNC1( addType   , const NamedTypeDecl *             );
     233INDEXER_FUNC1( addStruct , const StructDecl *                );
     234INDEXER_FUNC1( addEnum   , const EnumDecl *                  );
     235INDEXER_FUNC1( addUnion  , const UnionDecl *                 );
     236INDEXER_FUNC1( addTrait  , const TraitDecl *                 );
     237INDEXER_FUNC2( addWith   , const std::list< Expression * > &, const BaseSyntaxNode * );
    238238
    239239#undef INDEXER_FUNC1
     
    241241
    242242template<typename pass_type>
    243 static inline auto indexer_impl_addStructFwd( pass_type & pass, int, StructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) {
     243static inline auto indexer_impl_addStructFwd( pass_type & pass, int, const StructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) {
    244244        StructDecl * fwd = new StructDecl( decl->name );
    245245        cloneAll( decl->parameters, fwd->parameters );
     
    251251
    252252template<typename pass_type>
    253 static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) {
     253static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, const UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) {
    254254        UnionDecl * fwd = new UnionDecl( decl->name );
    255255        cloneAll( decl->parameters, fwd->parameters );
Note: See TracChangeset for help on using the changeset viewer.