Changes in src/Common/PassVisitor.proto.h [62423350:b73bd70]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.proto.h
r62423350 rb73bd70 5 5 6 6 typedef std::function<void( void * )> cleanup_func_t; 7 typedef std::function< void( cleanup_func_t, void * ) > at_cleanup_t;8 7 9 8 class guard_value_impl { 10 9 public: 11 guard_value_impl( at_cleanup_t * at_cleanup ) { 12 if( at_cleanup ) { 13 *at_cleanup = [this]( cleanup_func_t && func, void* val ) { 14 push( std::move( func ), val ); 15 }; 16 } 17 } 10 guard_value_impl() = default; 18 11 19 12 ~guard_value_impl() { … … 40 33 }; 41 34 35 typedef std::function< void( cleanup_func_t, void * ) > at_cleanup_t; 42 36 43 37 class bool_ref { … … 62 56 // Deep magic (a.k.a template meta programming) to make the templated visitor work 63 57 // Basically the goal is to make 2 previsit_impl 64 // 1 - Use when a pass implements a valid previsit. This uses overloading which means the any overload of 58 // 1 - Use when a pass implements a valid previsit. This uses overloading which means the any overload of 65 59 // 'pass.previsit( node )' that compiles will be used for that node for that type 66 60 // This requires that this option only compile for passes that actually define an appropriate visit.
Note:
See TracChangeset
for help on using the changeset viewer.