Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    rbd46af4 rcbce272  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Mon Aug 14 10:41:00 2017
    13 // Update Count     : 568
     12// Last Modified On : Wed Aug  9 13:50:00 2017
     13// Update Count     : 567
    1414//
    1515
     
    6363                aggregate.fields = nullptr;
    6464                aggregate.body = false;
     65                aggregate.tagged = false;
     66                aggregate.parent = nullptr;
    6567                break;
    6668          case AggregateInst:
     
    121123                delete aggregate.actuals;
    122124                delete aggregate.fields;
     125                delete aggregate.parent;
    123126                // delete aggregate;
    124127                break;
     
    621624        switch ( td->aggregate.kind ) {
    622625          case DeclarationNode::Struct:
     626                if ( td->aggregate.tagged ) {
     627                        at = new StructDecl( *td->aggregate.name, td->aggregate.parent, attributes, linkage );
     628                        buildForall( td->aggregate.params, at->get_parameters() );
     629                        break;
     630                }
    623631          case DeclarationNode::Coroutine:
    624632          case DeclarationNode::Monitor:
     
    628636                break;
    629637          case DeclarationNode::Union:
    630                 at = new UnionDecl( *td->aggregate.name, attributes, linkage );
     638                at = new UnionDecl( *td->aggregate.name, attributes );
    631639                buildForall( td->aggregate.params, at->get_parameters() );
    632640                break;
    633641          case DeclarationNode::Trait:
    634                 at = new TraitDecl( *td->aggregate.name, attributes, linkage );
     642                at = new TraitDecl( *td->aggregate.name, attributes );
    635643                buildList( td->aggregate.params, at->get_parameters() );
    636644                break;
     
    649657          case TypeData::Enum: {
    650658                  if ( type->enumeration.body ) {
    651                           EnumDecl * typedecl = buildEnum( type, attributes, linkage );
     659                          EnumDecl * typedecl = buildEnum( type, attributes );
    652660                          return new EnumInstType( buildQualifiers( type ), typedecl );
    653661                  } else {
     
    754762} // buildSymbolic
    755763
    756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
     764EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) {
    757765        assert( td->kind == TypeData::Enum );
    758         EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes, linkage );
     766        EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes );
    759767        buildList( td->enumeration.constants, ret->get_members() );
    760768        list< Declaration * >::iterator members = ret->get_members().begin();
     
    807815                return buildAggregate( td, attributes, linkage );
    808816        } else if ( td->kind == TypeData::Enum ) {
    809                 return buildEnum( td, attributes, linkage );
     817                return buildEnum( td, attributes );
    810818        } else if ( td->kind == TypeData::Symbolic ) {
    811819                return buildSymbolic( td, name, scs, linkage );
Note: See TracChangeset for help on using the changeset viewer.