Changeset b1e63ac5 for src/Parser/TypeData.cc
- Timestamp:
- Jul 4, 2017, 9:40:16 AM (7 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 208e5be
- Parents:
- 9c951e3 (diff), f7cb0bc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r9c951e3 rb1e63ac5 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 15:12:51 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Mar 17 15:52:43201713 // Update Count : 56 311 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jun 28 15:28:00 2017 13 // Update Count : 564 14 14 // 15 15 … … 630 630 } // buildReference 631 631 632 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes ) {632 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) { 633 633 assert( td->kind == TypeData::Aggregate ); 634 634 AggregateDecl * at; … … 638 638 case DeclarationNode::Monitor: 639 639 case DeclarationNode::Thread: 640 at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes );640 at = new StructDecl( *td->aggregate.name, td->aggregate.kind, attributes, linkage ); 641 641 buildForall( td->aggregate.params, at->get_parameters() ); 642 642 break; … … 659 659 } // buildAggregate 660 660 661 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes ) {661 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) { 662 662 switch ( type->kind ) { 663 663 case TypeData::Enum: { … … 672 672 ReferenceToType * ret; 673 673 if ( type->aggregate.body ) { 674 AggregateDecl * typedecl = buildAggregate( type, attributes );674 AggregateDecl * typedecl = buildAggregate( type, attributes, linkage ); 675 675 switch ( type->aggregate.kind ) { 676 676 case DeclarationNode::Struct: … … 776 776 if ( cur->has_enumeratorValue() ) { 777 777 ObjectDecl * member = dynamic_cast< ObjectDecl * >(* members); 778 member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ) , list< Expression * >()) );778 member->set_init( new SingleInit( maybeMoveBuild< Expression >( cur->consume_enumeratorValue() ) ) ); 779 779 } // if 780 780 } // for … … 793 793 TupleType * buildTuple( const TypeData * td ) { 794 794 assert( td->kind == TypeData::Tuple ); 795 TupleType * ret = new TupleType( buildQualifiers( td ) ); 796 buildTypeList( td->tuple, ret->get_types() ); 795 std::list< Type * > types; 796 buildTypeList( td->tuple, types ); 797 TupleType * ret = new TupleType( buildQualifiers( td ), types ); 797 798 buildForall( td->forall, ret->get_forall() ); 798 799 return ret; … … 818 819 return decl->set_asmName( asmName ); 819 820 } else if ( td->kind == TypeData::Aggregate ) { 820 return buildAggregate( td, attributes );821 return buildAggregate( td, attributes, linkage ); 821 822 } else if ( td->kind == TypeData::Enum ) { 822 823 return buildEnum( td, attributes );
Note: See TracChangeset
for help on using the changeset viewer.