Changeset b4a835d for src/Common
- Timestamp:
- May 8, 2018, 9:27:25 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, with_gc
- Children:
- df22130
- Parents:
- 3d60c08 (diff), afd550c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/Common
- Files:
-
- 2 edited
-
Heap.cc (modified) (2 diffs)
-
PassVisitor.proto.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Common/Heap.cc
r3d60c08 rb4a835d 130 130 abort(); 131 131 } 132 #endif 132 #endif // RTLD_NEXT 133 133 } // if 134 134 … … 144 144 fptr = (generic_fptr_t)dlsym( library, symbol ); 145 145 #endif // _GNU_SOURCE 146 147 error = dlerror(); 148 if ( error ) { 149 std::cerr << "interpose_symbol : internal error, " << error << std::endl; 150 abort(); 151 } 152 153 return fptr; 154 } 146 155 147 156 extern "C" { -
src/Common/PassVisitor.proto.h
r3d60c08 rb4a835d 47 47 48 48 operator bool() { return m_ref ? *m_ref : true; } 49 bool operator=( bool val ) { return *m_ref = val; }49 bool operator=( bool val ) { assert(m_ref); return *m_ref = val; } 50 50 51 51 private: … … 53 53 friend class ChildrenGuard; 54 54 55 bool * set( bool &val ) {55 bool * set( bool * val ) { 56 56 bool * prev = m_ref; 57 m_ref = &val;57 m_ref = val; 58 58 return prev; 59 59 } … … 67 67 ChildrenGuard( bool_ref * ref ) 68 68 : m_val ( true ) 69 , m_prev( ref ? ref->set( m_val ) : nullptr )69 , m_prev( ref ? ref->set( &m_val ) : nullptr ) 70 70 , m_ref ( ref ) 71 71 {} … … 73 73 ~ChildrenGuard() { 74 74 if( m_ref ) { 75 m_ref->set( *m_prev );75 m_ref->set( m_prev ); 76 76 } 77 77 }
Note:
See TracChangeset
for help on using the changeset viewer.