Changes in src/CodeGen/CodeGenerator.cc [d7312ac:da9d79b]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.cc (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
rd7312ac rda9d79b 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : S at May 5 09:08:32 201813 // Update Count : 49 412 // Last Modified On : Sun Sep 3 20:42:52 2017 13 // Update Count : 490 14 14 // 15 15 #include "CodeGenerator.h" … … 370 370 371 371 void CodeGenerator::postvisit( Constant * constant ) { 372 output << constant->get_value() ;372 output << constant->get_value() ; 373 373 } 374 374 … … 587 587 output << "("; 588 588 if ( castExpr->get_result()->isVoid() ) { 589 output << "(void)" ;589 output << "(void)" ; 590 590 } else { 591 591 // at least one result type of cast. … … 878 878 } // for 879 879 } // if 880 output << " );" ;880 output << " );" ; 881 881 } 882 882 … … 886 886 output << "( "; 887 887 if ( asmStmt->get_instruction() ) asmStmt->get_instruction()->accept( *visitor ); 888 output << " )"; 889 } 890 891 void CodeGenerator::postvisit( DirectiveStmt * dirStmt ) { 892 output << endl << dirStmt->directive; // endl prevents spaces before directive 888 output << " )" ; 893 889 } 894 890 … … 907 903 908 904 void CodeGenerator::postvisit( SwitchStmt * switchStmt ) { 909 output << "switch ( " ;905 output << "switch ( " ; 910 906 switchStmt->get_condition()->accept( *visitor ); 911 907 output << " ) "; … … 933 929 ++indent; 934 930 for ( std::list<Statement *>::iterator i = sts.begin(); i != sts.end(); i++) { 935 output << indent << printLabels( (*i)->get_labels() ) ;931 output << indent << printLabels( (*i)->get_labels() ) ; 936 932 (*i)->accept( *visitor ); 937 933 output << endl; … … 1070 1066 void CodeGenerator::postvisit( WhileStmt * whileStmt ) { 1071 1067 if ( whileStmt->get_isDoWhile() ) { 1072 output << "do" ;1073 } else { 1074 output << "while (" ;1068 output << "do" ; 1069 } else { 1070 output << "while (" ; 1075 1071 whileStmt->get_condition()->accept( *visitor ); 1076 1072 output << ")"; … … 1084 1080 1085 1081 if ( whileStmt->get_isDoWhile() ) { 1086 output << " while (" ;1082 output << " while (" ; 1087 1083 whileStmt->get_condition()->accept( *visitor ); 1088 1084 output << ");";
Note:
See TracChangeset
for help on using the changeset viewer.