Changes in src/Parser/TypeData.cc [cbce272:bd46af4]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
rcbce272 rbd46af4 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Aug 9 13:50:00 201713 // Update Count : 56 712 // Last Modified On : Mon Aug 14 10:41:00 2017 13 // Update Count : 568 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; … … 624 621 switch ( td->aggregate.kind ) { 625 622 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 623 case DeclarationNode::Coroutine: 632 624 case DeclarationNode::Monitor: … … 636 628 break; 637 629 case DeclarationNode::Union: 638 at = new UnionDecl( *td->aggregate.name, attributes );630 at = new UnionDecl( *td->aggregate.name, attributes, linkage ); 639 631 buildForall( td->aggregate.params, at->get_parameters() ); 640 632 break; 641 633 case DeclarationNode::Trait: 642 at = new TraitDecl( *td->aggregate.name, attributes );634 at = new TraitDecl( *td->aggregate.name, attributes, linkage ); 643 635 buildList( td->aggregate.params, at->get_parameters() ); 644 636 break; … … 657 649 case TypeData::Enum: { 658 650 if ( type->enumeration.body ) { 659 EnumDecl * typedecl = buildEnum( type, attributes );651 EnumDecl * typedecl = buildEnum( type, attributes, linkage ); 660 652 return new EnumInstType( buildQualifiers( type ), typedecl ); 661 653 } else { … … 762 754 } // buildSymbolic 763 755 764 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) {756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) { 765 757 assert( td->kind == TypeData::Enum ); 766 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes );758 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes, linkage ); 767 759 buildList( td->enumeration.constants, ret->get_members() ); 768 760 list< Declaration * >::iterator members = ret->get_members().begin(); … … 815 807 return buildAggregate( td, attributes, linkage ); 816 808 } else if ( td->kind == TypeData::Enum ) { 817 return buildEnum( td, attributes );809 return buildEnum( td, attributes, linkage ); 818 810 } else if ( td->kind == TypeData::Symbolic ) { 819 811 return buildSymbolic( td, name, scs, linkage );
Note: See TracChangeset
for help on using the changeset viewer.