Changeset 5f642e38 for src/CodeGen/CodeGenerator.cc
- Timestamp:
- Apr 19, 2017, 12:08:40 PM (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:
- e3987770
- Parents:
- 7069652
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r7069652 r5f642e38 172 172 } 173 173 174 void CodeGenerator::handleAggregate( AggregateDecl * aggDecl ) {174 void CodeGenerator::handleAggregate( AggregateDecl * aggDecl, const std::string & kind ) { 175 175 genAttributes( aggDecl->get_attributes() ); 176 176 … … 182 182 } 183 183 184 output << kind; 184 185 if ( aggDecl->get_name() != "" ) 185 186 output << aggDecl->get_name(); … … 204 205 void CodeGenerator::visit( StructDecl * structDecl ) { 205 206 extension( structDecl ); 206 output << "struct "; 207 handleAggregate( structDecl ); 207 handleAggregate( structDecl, "struct " ); 208 208 } 209 209 210 210 void CodeGenerator::visit( UnionDecl * unionDecl ) { 211 211 extension( unionDecl ); 212 output << "union "; 213 handleAggregate( unionDecl ); 212 handleAggregate( unionDecl, "union " ); 214 213 } 215 214 … … 578 577 extension( memberExpr ); 579 578 memberExpr->get_aggregate()->accept( *this ); 580 output << "." << memberExpr->get_member(); 579 output << "."; 580 memberExpr->get_member()->accept( *this ); 581 581 } 582 582
Note: See TracChangeset
for help on using the changeset viewer.