Changeset bd46af4


Ignore:
Timestamp:
Aug 14, 2017, 10:46:35 AM (7 years ago)
Author:
Andrew Beach <ajbeach@…>
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
Message:

Added linkage to more declarations, the remaining aggragates.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    rf6cc2096 rbd46af4  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 11 10:50:00 2017
    13 // Update Count     : 567
     12// Last Modified On : Mon Aug 14 10:41:00 2017
     13// Update Count     : 568
    1414//
    1515
     
    628628                break;
    629629          case DeclarationNode::Union:
    630                 at = new UnionDecl( *td->aggregate.name, attributes );
     630                at = new UnionDecl( *td->aggregate.name, attributes, linkage );
    631631                buildForall( td->aggregate.params, at->get_parameters() );
    632632                break;
    633633          case DeclarationNode::Trait:
    634                 at = new TraitDecl( *td->aggregate.name, attributes );
     634                at = new TraitDecl( *td->aggregate.name, attributes, linkage );
    635635                buildList( td->aggregate.params, at->get_parameters() );
    636636                break;
     
    649649          case TypeData::Enum: {
    650650                  if ( type->enumeration.body ) {
    651                           EnumDecl * typedecl = buildEnum( type, attributes );
     651                          EnumDecl * typedecl = buildEnum( type, attributes, linkage );
    652652                          return new EnumInstType( buildQualifiers( type ), typedecl );
    653653                  } else {
     
    754754} // buildSymbolic
    755755
    756 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) {
     756EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
    757757        assert( td->kind == TypeData::Enum );
    758         EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes );
     758        EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes, linkage );
    759759        buildList( td->enumeration.constants, ret->get_members() );
    760760        list< Declaration * >::iterator members = ret->get_members().begin();
     
    807807                return buildAggregate( td, attributes, linkage );
    808808        } else if ( td->kind == TypeData::Enum ) {
    809                 return buildEnum( td, attributes );
     809                return buildEnum( td, attributes, linkage );
    810810        } else if ( td->kind == TypeData::Symbolic ) {
    811811                return buildSymbolic( td, name, scs, linkage );
  • src/Parser/TypeData.h

    rf6cc2096 rbd46af4  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:18:36 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jul 22 09:32:47 2017
    13 // Update Count     : 188
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Mon Aug 14 10:38:00 2017
     13// Update Count     : 189
    1414//
    1515
     
    107107ReferenceToType * buildAggInst( const TypeData * );
    108108TypeDecl * buildVariable( const TypeData * );
    109 EnumDecl * buildEnum( const TypeData *, std::list< Attribute * > );
     109EnumDecl * buildEnum( const TypeData *, std::list< Attribute * >, LinkageSpec::Spec );
    110110TypeInstType * buildSymbolicInst( const TypeData * );
    111111TupleType * buildTuple( const TypeData * );
  • src/SynTree/Declaration.h

    rf6cc2096 rbd46af4  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Fri Aug 11 10:20:00 2017
    13 // Update Count     : 127
     12// Last Modified On : Mon Aug 14 10:15:00 2017
     13// Update Count     : 128
    1414//
    1515
     
    313313        typedef AggregateDecl Parent;
    314314  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 ) {
    316316                assertf( attributes.empty(), "attribute unsupported for traits" );
    317317        }
Note: See TracChangeset for help on using the changeset viewer.