Ignore:
File:
1 edited

Legend:

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

    r37e3af4 r7870799  
    118118static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {}
    119119
     120template<typename pass_type, typename node_type>
     121static inline auto previsit_impl( pass_type& pass, const node_type * node, __attribute__((unused)) int unused ) -> decltype( pass.previsit( node ), void() ) {
     122        pass.previsit( node );
     123}
     124
     125template<typename pass_type, typename node_type>
     126static inline void previsit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}
     127
     128
     129template<typename pass_type, typename node_type>
     130static inline auto postvisit_impl( pass_type& pass, const node_type * node, __attribute__((unused)) int unused ) -> decltype( pass.postvisit( node ), void() ) {
     131        pass.postvisit( node );
     132}
     133
     134template<typename pass_type, typename node_type>
     135static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}
     136
    120137//---------------------------------------------------------
    121138// Mutate
     
    200217        pass.indexer.func( arg );                                                                                                \
    201218}                                                                                                                              \
    202                                                                                                                                \
    203 template<typename pass_type>                                                                                                   \
    204 static inline void indexer_impl_##func ( pass_type &, long, type ) { }                                                          \
     219template<typename pass_type>                                                                                                   \
     220static inline void indexer_impl_##func ( pass_type &, long, type ) { }
    205221
    206222#define INDEXER_FUNC2( func, type1, type2 )                                                                                             \
     
    209225        pass.indexer.func( arg1, arg2 );                                                                                                \
    210226}                                                                                                                              \
    211                                                                                                                                \
    212227template<typename pass_type>                                                                                                   \
    213228static inline void indexer_impl_##func ( pass_type &, long, type1, type2 ) { }
     
    233248
    234249template<typename pass_type>
    235 static inline auto indexer_impl_addStructFwd( pass_type &, long, StructDecl * ) {}
     250static inline auto indexer_impl_addStructFwd( pass_type &, long, const StructDecl * ) {}
    236251
    237252template<typename pass_type>
     
    243258
    244259template<typename pass_type>
    245 static inline auto indexer_impl_addUnionFwd( pass_type &, long, UnionDecl * ) {}
     260static inline auto indexer_impl_addUnionFwd( pass_type &, long, const UnionDecl * ) {}
    246261
    247262template<typename pass_type>
Note: See TracChangeset for help on using the changeset viewer.