Changes in src/Parser/TypeData.cc [6ea87486:62423350]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r6ea87486 r62423350 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 15:12:51 2015 11 // Last Modified By : Andrew Beach12 // Last Modified On : Fri Jul 14 16:58:00201713 // Update Count : 56 511 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Mar 17 15:52:43 2017 13 // Update Count : 563 14 14 // 15 15 … … 63 63 aggregate.fields = nullptr; 64 64 aggregate.body = false; 65 aggregate.tagged = false;66 aggregate.parent = nullptr;67 65 break; 68 66 case AggregateInst: … … 123 121 delete aggregate.actuals; 124 122 delete aggregate.fields; 125 delete aggregate.parent;126 123 // delete aggregate; 127 124 break; … … 195 192 newtype->aggregate.kind = aggregate.kind; 196 193 newtype->aggregate.body = aggregate.body; 197 newtype->aggregate.tagged = aggregate.tagged;198 newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr;199 194 break; 200 195 case AggregateInst: … … 619 614 } // buildPointer 620 615 621 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes , LinkageSpec::Spec linkage) {616 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes ) { 622 617 assert( td->kind == TypeData::Aggregate ); 623 618 AggregateDecl * at; 624 619 switch ( td->aggregate.kind ) { 625 620 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 }631 621 case DeclarationNode::Coroutine: 632 622 case DeclarationNode::Monitor: 633 623 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 ); 635 625 buildForall( td->aggregate.params, at->get_parameters() ); 636 626 break; … … 653 643 } // buildAggregate 654 644 655 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes , LinkageSpec::Spec linkage) {645 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes ) { 656 646 switch ( type->kind ) { 657 647 case TypeData::Enum: { … … 666 656 ReferenceToType * ret; 667 657 if ( type->aggregate.body ) { 668 AggregateDecl * typedecl = buildAggregate( type, attributes , linkage);658 AggregateDecl * typedecl = buildAggregate( type, attributes ); 669 659 switch ( type->aggregate.kind ) { 670 660 case DeclarationNode::Struct: … … 813 803 return decl->set_asmName( asmName ); 814 804 } else if ( td->kind == TypeData::Aggregate ) { 815 return buildAggregate( td, attributes , linkage);805 return buildAggregate( td, attributes ); 816 806 } else if ( td->kind == TypeData::Enum ) { 817 807 return buildEnum( td, attributes );
Note: See TracChangeset
for help on using the changeset viewer.