Changeset 4990812
- Timestamp:
- May 8, 2018, 5:14:39 PM (7 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:
- afd550c
- Parents:
- 5fec3f6
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Common/PassVisitor.proto.h
r5fec3f6 r4990812 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 } -
src/main.cc
r5fec3f6 r4990812 371 371 } // if 372 372 return 1; 373 } // try 373 } catch(...) { 374 std::exception_ptr eptr = std::current_exception(); 375 try { 376 if (eptr) { 377 std::rethrow_exception(eptr); 378 } 379 else { 380 std::cerr << "Exception Uncaught and Unkown" << std::endl; 381 } 382 } catch(const std::exception& e) { 383 std::cerr << "Unaught Exception \"" << e.what() << "\"\n"; 384 } 385 return 1; 386 }// try 374 387 375 388 deleteAll( translationUnit );
Note: See TracChangeset
for help on using the changeset viewer.