Ignore:
Timestamp:
Aug 14, 2017, 10:46:35 AM (5 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
aaron-thesis, arm-eh, 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.

File:
1 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 );
Note: See TracChangeset for help on using the changeset viewer.