Ignore:
File:
1 edited

Legend:

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

    r134322e r7b13aeb  
    2323
    2424template<typename pass_type, typename node_type>
    25 static inline void previsit_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}
     25static inline void previsit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {}
    2626
    2727
     
    3232
    3333template<typename pass_type, typename node_type>
    34 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}
     34static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {}
    3535
    3636// Mutate
     
    4141
    4242template<typename pass_type, typename node_type>
    43 static inline void premutate_impl( __attribute__((unused)) pass_type& pass, node_type * node, __attribute__((unused)) long unused ) {}
     43static inline void premutate_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {}
    4444
    4545
     
    7171
    7272// Fields
    73 #define FIELD_PTR( type, name )                                                                                                                  \
    74 template<typename pass_type>                                                                                                                     \
    75 static inline auto name##_impl( pass_type& pass, __attribute__((unused)) int unused ) ->decltype( &pass.name ) { return &pass.name; }          \
    76                                                                                                                                                  \
    77 template<typename pass_type>                                                                                                                     \
     73#define FIELD_PTR( type, name )                                                                                                        \
     74template<typename pass_type>                                                                                                           \
     75static inline auto name##_impl( pass_type& pass, __attribute__((unused)) int unused ) ->decltype( &pass.name ) { return &pass.name; }  \
     76                                                                                                                                       \
     77template<typename pass_type>                                                                                                           \
    7878static inline type * name##_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) long unused ) { return nullptr;}    \
    7979
     
    8181FIELD_PTR( std::list< Statement* >, stmtsToAddBefore )
    8282FIELD_PTR( std::list< Statement* >, stmtsToAddAfter  )
     83FIELD_PTR( bool, skip_children )
Note: See TracChangeset for help on using the changeset viewer.