Changes in src/Common/PassVisitor.proto.h [e67991f:37e3af4]
- File:
-
- 1 edited
-
src/Common/PassVisitor.proto.h (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.proto.h
re67991f r37e3af4 118 118 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) node_type * node, __attribute__((unused)) long unused ) {} 119 119 120 template<typename pass_type, typename node_type>121 static 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 125 template<typename pass_type, typename node_type>126 static inline void previsit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}127 128 129 template<typename pass_type, typename node_type>130 static 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 134 template<typename pass_type, typename node_type>135 static inline void postvisit_impl( __attribute__((unused)) pass_type& pass, __attribute__((unused)) const node_type * node, __attribute__((unused)) long unused ) {}136 137 120 //--------------------------------------------------------- 138 121 // Mutate … … 217 200 pass.indexer.func( arg ); \ 218 201 } \ 219 template<typename pass_type> \ 220 static inline void indexer_impl_##func ( pass_type &, long, type ) { } 202 \ 203 template<typename pass_type> \ 204 static inline void indexer_impl_##func ( pass_type &, long, type ) { } \ 221 205 222 206 #define INDEXER_FUNC2( func, type1, type2 ) \ … … 225 209 pass.indexer.func( arg1, arg2 ); \ 226 210 } \ 211 \ 227 212 template<typename pass_type> \ 228 213 static inline void indexer_impl_##func ( pass_type &, long, type1, type2 ) { } 229 214 230 215 231 INDEXER_FUNC1( addId , constDeclarationWithType * );232 INDEXER_FUNC1( addType , constNamedTypeDecl * );233 INDEXER_FUNC1( addStruct , constStructDecl * );234 INDEXER_FUNC1( addEnum , constEnumDecl * );235 INDEXER_FUNC1( addUnion , constUnionDecl * );236 INDEXER_FUNC1( addTrait , constTraitDecl * );237 INDEXER_FUNC2( addWith , const std::list< Expression * > &, const Declaration* );216 INDEXER_FUNC1( addId , DeclarationWithType * ); 217 INDEXER_FUNC1( addType , NamedTypeDecl * ); 218 INDEXER_FUNC1( addStruct , StructDecl * ); 219 INDEXER_FUNC1( addEnum , EnumDecl * ); 220 INDEXER_FUNC1( addUnion , UnionDecl * ); 221 INDEXER_FUNC1( addTrait , TraitDecl * ); 222 INDEXER_FUNC2( addWith , std::list< Expression * > &, BaseSyntaxNode * ); 238 223 239 224 #undef INDEXER_FUNC1 … … 241 226 242 227 template<typename pass_type> 243 static inline auto indexer_impl_addStructFwd( pass_type & pass, int, constStructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) {228 static inline auto indexer_impl_addStructFwd( pass_type & pass, int, StructDecl * decl ) -> decltype( pass.indexer.addStruct( decl ), void() ) { 244 229 StructDecl * fwd = new StructDecl( decl->name ); 245 230 cloneAll( decl->parameters, fwd->parameters ); … … 248 233 249 234 template<typename pass_type> 250 static inline auto indexer_impl_addStructFwd( pass_type &, long, constStructDecl * ) {}251 252 template<typename pass_type> 253 static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, constUnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) {235 static inline auto indexer_impl_addStructFwd( pass_type &, long, StructDecl * ) {} 236 237 template<typename pass_type> 238 static inline auto indexer_impl_addUnionFwd( pass_type & pass, int, UnionDecl * decl ) -> decltype( pass.indexer.addUnion( decl ), void() ) { 254 239 UnionDecl * fwd = new UnionDecl( decl->name ); 255 240 cloneAll( decl->parameters, fwd->parameters ); … … 258 243 259 244 template<typename pass_type> 260 static inline auto indexer_impl_addUnionFwd( pass_type &, long, constUnionDecl * ) {}245 static inline auto indexer_impl_addUnionFwd( pass_type &, long, UnionDecl * ) {} 261 246 262 247 template<typename pass_type>
Note:
See TracChangeset
for help on using the changeset viewer.