Changeset 0720e049 for src/Parser/TypeData.cc
- Timestamp:
- Aug 11, 2017, 10:33:37 AM (8 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:
- 54cd58b0
- Parents:
- 3d4b23fa (diff), 59a75cb (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r3d4b23fa r0720e049 10 10 // Created On : Sat May 16 15:12:51 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed Jun 28 15:28:00 201713 // Update Count : 56 412 // Last Modified On : Wed Aug 9 13:50:00 2017 13 // Update Count : 567 14 14 // 15 15 … … 63 63 aggregate.fields = nullptr; 64 64 aggregate.body = false; 65 aggregate.tagged = false; 66 aggregate.parent = nullptr; 65 67 break; 66 68 case AggregateInst: … … 121 123 delete aggregate.actuals; 122 124 delete aggregate.fields; 125 delete aggregate.parent; 123 126 // delete aggregate; 124 127 break; … … 192 195 newtype->aggregate.kind = aggregate.kind; 193 196 newtype->aggregate.body = aggregate.body; 197 newtype->aggregate.tagged = aggregate.tagged; 198 newtype->aggregate.parent = aggregate.parent ? new string( *aggregate.parent ) : nullptr; 194 199 break; 195 200 case AggregateInst: … … 449 454 case TypeData::Builtin: 450 455 if(td->builtintype == DeclarationNode::Zero) { 451 return new ZeroType( emptyQualifiers );456 return new ZeroType( noQualifiers ); 452 457 } 453 458 else if(td->builtintype == DeclarationNode::One) { 454 return new OneType( emptyQualifiers );459 return new OneType( noQualifiers ); 455 460 } 456 461 else { … … 619 624 switch ( td->aggregate.kind ) { 620 625 case DeclarationNode::Struct: 626 if ( td->aggregate.tagged ) { 627 at = new StructDecl( *td->aggregate.name, td->aggregate.parent, attributes, linkage ); 628 buildForall( td->aggregate.params, at->get_parameters() ); 629 break; 630 } 621 631 case DeclarationNode::Coroutine: 622 632 case DeclarationNode::Monitor: … … 738 748 } // buildAggInst 739 749 740 NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs ) {750 NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage ) { 741 751 assert( td->kind == TypeData::Symbolic ); 742 752 NamedTypeDecl * ret; 743 753 assert( td->base ); 744 754 if ( td->symbolic.isTypedef ) { 745 ret = new TypedefDecl( name, scs, typebuild( td->base ) );755 ret = new TypedefDecl( name, scs, typebuild( td->base ), linkage ); 746 756 } else { 747 757 ret = new TypeDecl( name, scs, typebuild( td->base ), TypeDecl::Any ); … … 807 817 return buildEnum( td, attributes ); 808 818 } else if ( td->kind == TypeData::Symbolic ) { 809 return buildSymbolic( td, name, scs );819 return buildSymbolic( td, name, scs, linkage ); 810 820 } else { 811 821 return (new ObjectDecl( name, scs, linkage, bitfieldWidth, typebuild( td ), init, attributes ))->set_asmName( asmName );
Note:
See TracChangeset
for help on using the changeset viewer.