Changeset 724c2b6 for src/CodeGen/CodeGenerator.cc
- Timestamp:
- Jul 15, 2015, 4:47:48 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 1db21619
- Parents:
- 9163b9c (diff), 1ab4ce2 (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/CodeGen/CodeGenerator.cc
r9163b9c r724c2b6 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Peter A. Buhr12 // Last Modified On : Fri Jun 26 16:52:58201513 // Update Count : 1 4411 // Last Modified By : Rob Schluntz 12 // Last Modified On : Wed Jul 15 14:47:42 2015 13 // Update Count : 177 14 14 // 15 15 … … 38 38 int CodeGenerator::tabsize = 4; 39 39 40 // the kinds of statements that would ideally be separated by morewhitespace40 // the kinds of statements that would ideally be followed by whitespace 41 41 bool wantSpacing( Statement * stmt) { 42 42 return dynamic_cast< IfStmt * >( stmt ) || dynamic_cast< CompoundStmt * >( stmt ) || … … 588 588 589 589 void CodeGenerator::visit( ForStmt *forStmt ) { 590 output << "for ("; 591 592 if ( forStmt->get_initialization() != 0 ) 593 forStmt->get_initialization()->accept( *this ); 594 else 595 output << ";"; 596 590 // initialization is always hoisted, so don't 591 // bother doing anything with that 592 output << "for (;"; 593 597 594 if ( forStmt->get_condition() != 0 ) 598 595 forStmt->get_condition()->accept( *this );
Note: See TracChangeset
for help on using the changeset viewer.