Ignore:
Timestamp:
Aug 14, 2017, 2:07:34 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
6cfe8bb
Parents:
36a5a77 (diff), bd46af4 (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

    r36a5a77 r8217e8f  
    1010// Created On       : Sat May 16 15:12:51 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Wed Aug  9 13:50:00 2017
    13 // Update Count     : 567
     12// Last Modified On : Mon Aug 14 10:41:00 2017
     13// Update Count     : 568
    1414//
    1515
     
    6464                aggregate.fields = nullptr;
    6565                aggregate.body = false;
    66                 aggregate.tagged = false;
    67                 aggregate.parent = nullptr;
    6866                break;
    6967          case AggregateInst:
     
    125123                delete aggregate.actuals;
    126124                delete aggregate.fields;
    127                 delete aggregate.parent;
    128125                // delete aggregate;
    129126                break;
     
    640637        switch ( td->aggregate.kind ) {
    641638          case DeclarationNode::Struct:
    642                 if ( td->aggregate.tagged ) {
    643                         at = new StructDecl( *td->aggregate.name, td->aggregate.parent, attributes, linkage );
    644                         buildForall( td->aggregate.params, at->get_parameters() );
    645                         break;
    646                 }
    647639          case DeclarationNode::Coroutine:
    648640          case DeclarationNode::Monitor:
     
    652644                break;
    653645          case DeclarationNode::Union:
    654                 at = new UnionDecl( *td->aggregate.name, attributes );
     646                at = new UnionDecl( *td->aggregate.name, attributes, linkage );
    655647                buildForall( td->aggregate.params, at->get_parameters() );
    656648                break;
    657649          case DeclarationNode::Trait:
    658                 at = new TraitDecl( *td->aggregate.name, attributes );
     650                at = new TraitDecl( *td->aggregate.name, attributes, linkage );
    659651                buildList( td->aggregate.params, at->get_parameters() );
    660652                break;
     
    673665          case TypeData::Enum: {
    674666                  if ( type->enumeration.body ) {
    675                           EnumDecl * typedecl = buildEnum( type, attributes );
     667                          EnumDecl * typedecl = buildEnum( type, attributes, linkage );
    676668                          return new EnumInstType( buildQualifiers( type ), typedecl );
    677669                  } else {
     
    778770} // buildSymbolic
    779771
    780 EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes ) {
     772EnumDecl * buildEnum( const TypeData * td, std::list< Attribute * > attributes, LinkageSpec::Spec linkage ) {
    781773        assert( td->kind == TypeData::Enum );
    782         EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes );
     774        EnumDecl * ret = new EnumDecl( *td->enumeration.name, attributes, linkage );
    783775        buildList( td->enumeration.constants, ret->get_members() );
    784776        list< Declaration * >::iterator members = ret->get_members().begin();
     
    831823                return buildAggregate( td, attributes, linkage );
    832824        } else if ( td->kind == TypeData::Enum ) {
    833                 return buildEnum( td, attributes );
     825                return buildEnum( td, attributes, linkage );
    834826        } else if ( td->kind == TypeData::Symbolic ) {
    835827                return buildSymbolic( td, name, scs, linkage );
Note: See TracChangeset for help on using the changeset viewer.