Changes in / [a62749f:6e3e0717]


Ignore:
Location:
src/AST
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Convert.cpp

    ra62749f r6e3e0717  
    159159                auto&& attr = get<Attribute>().acceptL( node->attributes );
    160160                if ( inCache( node ) ) {
    161                         if(node->name == "tmp") {
    162                                 std::cerr << (void*)node << "(new) in cache " << (void*)this->node << "(old)" << std::endl;
    163                         }
    164161                        return nullptr;
    165162                }
     
    174171                        Type::FuncSpecifiers( node->funcSpec.val )
    175172                );
    176                 if(node->name == "tmp") {
    177                         std::cerr << (void*)node << "(new) created " << (void*)decl << "(old)" << std::endl;
    178                 }
    179173                return declWithTypePostamble( decl, node );
    180174        }
     
    14711465
    14721466        virtual void visit( ObjectDecl * old ) override final {
    1473                 if( old->name == "tmp" ) {
    1474                         std::cerr << "building parameters for" << (void*)old << std::endl;
    1475                 }
    14761467                auto&& type = GET_ACCEPT_1(type, Type);
    14771468                auto&& init = GET_ACCEPT_1(init, Init);
    14781469                auto&& bfwd = GET_ACCEPT_1(bitfieldWidth, Expr);
    14791470                auto&& attr = GET_ACCEPT_V(attributes, Attribute);
    1480                 if( old->name == "tmp" ) {
    1481                         std::cerr << "checking cache for " << (void*)old << std::endl;
    1482                 }
    14831471                if ( inCache( old ) ) {
    1484                         if( old->name == "tmp" ) {
    1485                                 std::cerr << (void*)old << "(old) in cache " << (void*)this->node << "(new)" << std::endl;
    1486                         }
    14871472                        return;
    14881473                }
     
    14991484                );
    15001485                cache.emplace(old, decl);
    1501                 if( old->name == "tmp" ) {
    1502                         std::cerr << (void*)old << "(old) added to cache with " << (void*)decl << "(new)" << std::endl;
    1503                 }
    15041486                assert(cache.find( old ) != cache.end());
    15051487                decl->scopeLevel = old->scopeLevel;
     
    15101492
    15111493                this->node = decl;
    1512 
    1513                 if( old->name == "tmp" ) {
    1514                         std::cerr << (void*)old << "(old) created " << (void*)this->node << "(new)" << std::endl;
    1515                 }
    15161494        }
    15171495
  • src/AST/Pass.hpp

    ra62749f r6e3e0717  
    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.