Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r6ea87486 r62423350  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:12:51 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Jul 14 16:58:00 2017
    13 // Update Count     : 565
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Fri Mar 17 15:52:43 2017
     13// Update Count     : 563
    1414//
    1515
     
    6363                aggregate.fields = nullptr;
    6464                aggregate.body = false;
    65                 aggregate.tagged = false;
    66                 aggregate.parent = nullptr;
    6765                break;
    6866          case AggregateInst:
     
    123121                delete aggregate.actuals;
    124122                delete aggregate.fields;
    125                 delete aggregate.parent;
    126123                // delete aggregate;
    127124                break;
     
    195192                newtype->aggregate.kind = aggregate.kind;
    196193                newtype->aggregate.body = aggregate.body;
    197                 newtype->aggregate.tagged = aggregate.tagged;
    198                 newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr;
    199194                break;
    200195          case AggregateInst:
     
    619614} // buildPointer
    620615
    621 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
     616AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes ) {
    622617        assert( td->kind == TypeData::Aggregate );
    623618        AggregateDecl * at;
    624619        switch ( td->aggregate.kind ) {
    625620          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                 }
    631621          case DeclarationNode::Coroutine:
    632622          case DeclarationNode::Monitor:
    633623          case DeclarationNode::Thread:
    634                 at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes, linkage );
     624                at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes );
    635625                buildForall( td->aggregate.params, at->get_parameters() );
    636626                break;
     
    653643} // buildAggregate
    654644
    655 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
     645ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes ) {
    656646        switch ( type->kind ) {
    657647          case TypeData::Enum: {
     
    666656                  ReferenceToType * ret;
    667657                  if ( type->aggregate.body ) {
    668                           AggregateDecl * typedecl = buildAggregate( type, attributes, linkage );
     658                          AggregateDecl * typedecl = buildAggregate( type, attributes );
    669659                          switch ( type->aggregate.kind ) {
    670660                                case DeclarationNode::Struct:
     
    813803                return decl->set_asmName( asmName );
    814804        } else if ( td->kind == TypeData::Aggregate ) {
    815                 return buildAggregate( td, attributes, linkage );
     805                return buildAggregate( td, attributes );
    816806        } else if ( td->kind == TypeData::Enum ) {
    817807                return buildEnum( td, attributes );
Note: See TracChangeset for help on using the changeset viewer.