Changeset e16e27e1


Ignore:
Timestamp:
Jun 7, 2019, 3:30:10 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
9856ca9
Parents:
9151fcb
Message:

Fix to WithGuards? accessory which didn't work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Pass.hpp

    r9151fcb re16e27e1  
    262262/// Used to restore values/functions/etc. when the Pass finishes visiting this node
    263263class WithGuards {
    264         __pass::at_cleanup_t at_cleanup;
    265 
     264        __pass::at_cleanup_t at_cleanup = [](__pass::cleanup_func_t, void*) {
     265                std::cerr << "No cleanup function was set" << std::endl;
     266                abort();
     267        };
     268
     269        template< typename pass_t>
     270        friend auto __pass::at_cleanup( pass_t & pass, int ) -> decltype( &pass.at_cleanup );
    266271public:
     272
    267273        /// When this node is finished being visited, restore the value of a variable
    268274        template< typename T >
Note: See TracChangeset for help on using the changeset viewer.