Changeset b73bd70 for src/Common/PassVisitor.proto.h
- Timestamp:
- Jun 22, 2017, 1:13:26 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 186b398
- Parents:
- 65dc863
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.proto.h
r65dc863 rb73bd70 1 1 #pragma once 2 3 template<typename pass_type> 4 class PassVisitor; 2 5 3 6 typedef std::function<void( void * )> cleanup_func_t; … … 31 34 32 35 typedef std::function< void( cleanup_func_t, void * ) > at_cleanup_t; 36 37 class bool_ref { 38 public: 39 bool_ref() = default; 40 ~bool_ref() = default; 41 42 operator bool() { return *m_ref; } 43 bool operator=( bool val ) { return *m_ref = val; } 44 45 private: 46 47 template<typename pass> 48 friend class PassVisitor; 49 50 void set( bool & val ) { m_ref = &val; }; 51 52 bool * m_ref; 53 }; 33 54 34 55 //------------------------------------------------------------------------------------------------------------------------------------------------------------------------- … … 114 135 FIELD_PTR( std::list< Declaration* >, declsToAddBefore ) 115 136 FIELD_PTR( std::list< Declaration* >, declsToAddAfter ) 116 FIELD_PTR( bool , skip_children )137 FIELD_PTR( bool_ref, visit_children ) 117 138 FIELD_PTR( at_cleanup_t, at_cleanup ) 139 FIELD_PTR( PassVisitor<pass_type> * const, visitor )
Note: See TracChangeset
for help on using the changeset viewer.