Ignore:
Timestamp:
Jul 4, 2017, 9:40:16 AM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
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.
Message:

Merge branch 'master' into references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/TypeData.cc

    r9c951e3 rb1e63ac5  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 15:12:51 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Mar 17 15:52:43 2017
    13 // Update Count     : 563
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed Jun 28 15:28:00 2017
     13// Update Count     : 564
    1414//
    1515
     
    630630} // buildReference
    631631
    632 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes ) {
     632AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
    633633        assert( td->kind == TypeData::Aggregate );
    634634        AggregateDecl * at;
     
    638638          case DeclarationNode::Monitor:
    639639          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 );
    641641                buildForall( td->aggregate.params, at->get_parameters() );
    642642                break;
     
    659659} // buildAggregate
    660660
    661 ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes ) {
     661ReferenceToType * buildComAggInst( const TypeData * type, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
    662662        switch ( type->kind ) {
    663663          case TypeData::Enum: {
     
    672672                  ReferenceToType * ret;
    673673                  if ( type->aggregate.body ) {
    674                           AggregateDecl * typedecl = buildAggregate( type, attributes );
     674                          AggregateDecl * typedecl = buildAggregate( type, attributes, linkage );
    675675                          switch ( type->aggregate.kind ) {
    676676                                case DeclarationNode::Struct:
     
    776776                if ( cur->has_enumeratorValue() ) {
    777777                        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() ) ) );
    779779                } // if
    780780        } // for
     
    793793TupleType * buildTuple( const TypeData * td ) {
    794794        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 );
    797798        buildForall( td->forall, ret->get_forall() );
    798799        return ret;
     
    818819                return decl->set_asmName( asmName );
    819820        } else if ( td->kind == TypeData::Aggregate ) {
    820                 return buildAggregate( td, attributes );
     821                return buildAggregate( td, attributes, linkage );
    821822        } else if ( td->kind == TypeData::Enum ) {
    822823                return buildEnum( td, attributes );
Note: See TracChangeset for help on using the changeset viewer.