Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    ra984e65 r87e08e24  
    195195                }
    196196
    197                 output << kind << aggDecl->get_name();
     197                output << kind;
     198                if ( aggDecl->get_name() != "" )
     199                        output << aggDecl->get_name();
    198200
    199201                if ( aggDecl->has_body() ) {
     
    231233                genAttributes( enumDecl->get_attributes() );
    232234
    233                 output << enumDecl->get_name();
     235                if ( enumDecl->get_name() != "" )
     236                        output << enumDecl->get_name();
    234237
    235238                std::list< Declaration* > &memb = enumDecl->get_members();
     
    257260        }
    258261
    259         void CodeGenerator::visit( TraitDecl * traitDecl ) {
    260                 assertf( ! genC, "TraitDecl nodes should not reach code generation." );
    261                 extension( traitDecl );
    262                 handleAggregate( traitDecl, "trait " );
    263         }
     262        void CodeGenerator::visit( __attribute__((unused)) TraitDecl * traitDecl ) {}
    264263
    265264        void CodeGenerator::visit( TypedefDecl * typeDecl ) {
     
    761760                for ( Statement * stmt : stmts ) {
    762761                        updateLocation( stmt );
    763                         output << indent << printLabels( stmt->get_labels() );
     762                        output << printLabels( stmt->get_labels() );
    764763                        if ( i+1 == numStmts ) {
    765764                                // last statement in a statement expression needs to be handled specially -
Note: See TracChangeset for help on using the changeset viewer.