Changeset ce8c12f for src/Parser/TypeData.cc
- Timestamp:
- May 15, 2017, 11:30:26 AM (7 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:
- d36c117
- Parents:
- 65aca88
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cc
r65aca88 rce8c12f 30 30 case Unknown: 31 31 case Pointer: 32 case Reference: 32 33 case EnumConstant: 33 34 // nothing else to initialize … … 99 100 case Unknown: 100 101 case Pointer: 102 case Reference: 101 103 case EnumConstant: 102 104 // nothing to destroy … … 165 167 case EnumConstant: 166 168 case Pointer: 169 case Reference: 167 170 // nothing else to copy 168 171 break; … … 434 437 case TypeData::Array: 435 438 return buildArray( td ); 439 case TypeData::Reference: 440 return buildReference( td ); 436 441 case TypeData::Function: 437 442 return buildFunction( td ); … … 612 617 buildForall( td->forall, at->get_forall() ); 613 618 return at; 614 } // buildPointer 619 } // buildArray 620 621 ReferenceType * buildReference( const TypeData * td ) { 622 ReferenceType * rt; 623 if ( td->base ) { 624 rt = new ReferenceType( buildQualifiers( td ), typebuild( td->base ) ); 625 } else { 626 rt = new ReferenceType( buildQualifiers( td ), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ); 627 } // if 628 buildForall( td->forall, rt->get_forall() ); 629 return rt; 630 } // buildReference 615 631 616 632 AggregateDecl * buildAggregate( const TypeData * td, std::list< Attribute * > attributes ) {
Note: See TracChangeset
for help on using the changeset viewer.