Changeset 6a625de for src/Common


Ignore:
Timestamp:
May 8, 2019, 4:19:13 PM (5 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
2ed1d50
Parents:
b1d3ee1
Message:

Some clean-up, some more assertions to check assumptions and changes to node.hpp

Location:
src/Common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Common/Assert.cc

    rb1d3ee1 r6a625de  
    3939}
    4040
     41void abort(const char *fmt, ... ) noexcept __attribute__((noreturn, format(printf, 1, 2)));
     42void abort(const char *fmt, ... ) noexcept {
     43        va_list args;
     44        va_start( args, fmt );
     45        vfprintf( stderr, fmt, args );
     46        va_end( args );
     47        fprintf( stderr, "\n" );
     48        abort();
     49}
     50
    4151// Local Variables: //
    4252// tab-width: 4 //
  • src/Common/PassVisitor.impl.h

    rb1d3ee1 r6a625de  
    2020
    2121#define MUTATE_END( type, node )                \
    22         return call_postmutate< type * >( node ); \
     22        auto __return = call_postmutate< type * >( node ); \
     23        assert( __return ); \
     24        return __return;
    2325
    2426
  • src/Common/PassVisitor.proto.h

    rb1d3ee1 r6a625de  
    174174FIELD_PTR( PassVisitor<pass_type> * const, visitor )
    175175
     176#undef FIELD_PTR
     177
    176178//---------------------------------------------------------
    177179// Indexer
Note: See TracChangeset for help on using the changeset viewer.