Changeset bd46af4
- Timestamp:
- Aug 14, 2017, 10:46:35 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:
- 406a6e6, 8217e8f
- Parents:
- f6cc2096
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
rf6cc2096 rbd46af4 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Aug 11 10: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 … … 628 628 break; 629 629 case DeclarationNode::Union: 630 at = new UnionDecl( *td->aggregate.name, attributes );630 at = new UnionDecl( *td->aggregate.name, attributes, linkage ); 631 631 buildForall( td->aggregate.params, at->get_parameters() ); 632 632 break; 633 633 case DeclarationNode::Trait: 634 at = new TraitDecl( *td->aggregate.name, attributes );634 at = new TraitDecl( *td->aggregate.name, attributes, linkage ); 635 635 buildList( td->aggregate.params, at->get_parameters() ); 636 636 break; … … 649 649 case TypeData::Enum: { 650 650 if ( type->enumeration.body ) { 651 EnumDecl * typedecl = buildEnum( type, attributes );651 EnumDecl * typedecl = buildEnum( type, attributes, linkage ); 652 652 return new EnumInstType( buildQualifiers( type ), typedecl ); 653 653 } else { … … 754 754 } // buildSymbolic 755 755 756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) {756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) { 757 757 assert( td->kind == TypeData::Enum ); 758 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes );758 EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes, linkage ); 759 759 buildList( td->enumeration.constants, ret->get_members() ); 760 760 list< Declaration * >::iterator members = ret->get_members().begin(); … … 807 807 return buildAggregate( td, attributes, linkage ); 808 808 } else if ( td->kind == TypeData::Enum ) { 809 return buildEnum( td, attributes );809 return buildEnum( td, attributes, linkage ); 810 810 } else if ( td->kind == TypeData::Symbolic ) { 811 811 return buildSymbolic( td, name, scs, linkage ); -
src/Parser/TypeData.h
rf6cc2096 rbd46af4 9 9 // Author : Rodolfo G. Esteves 10 10 // Created On : Sat May 16 15:18:36 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Sat Jul 22 09:32:47201713 // Update Count : 18 811 // Last Modified By : Andrew Beach 12 // Last Modified On : Mon Aug 14 10:38:00 2017 13 // Update Count : 189 14 14 // 15 15 … … 107 107 ReferenceToType * buildAggInst( const TypeData * ); 108 108 TypeDecl * buildVariable( const TypeData * ); 109 EnumDecl * buildEnum( const TypeData *, std::list< Attribute * > );109 EnumDecl * buildEnum( const TypeData *, std::list< Attribute * >, LinkageSpec::Spec ); 110 110 TypeInstType * buildSymbolicInst( const TypeData * ); 111 111 TupleType * buildTuple( const TypeData * ); -
src/SynTree/Declaration.h
rf6cc2096 rbd46af4 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Fri Aug 11 10:20:00 201713 // Update Count : 12 712 // Last Modified On : Mon Aug 14 10:15:00 2017 13 // Update Count : 128 14 14 // 15 15 … … 313 313 typedef AggregateDecl Parent; 314 314 public: 315 TraitDecl( const std::string &name, const std::list< Attribute * > & attributes ) : Parent( name ) {315 TraitDecl( const std::string &name, const std::list< Attribute * > & attributes, LinkageSpec::Spec linkage ) : Parent( name, attributes, linkage ) { 316 316 assertf( attributes.empty(), "attribute unsupported for traits" ); 317 317 }
Note: See TracChangeset
for help on using the changeset viewer.