Changes in src/CodeGen/CodeGenerator.h [888cbe4:e04ef3a]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.h
r888cbe4 re04ef3a 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // CodeGenerator.h -- 7 // CodeGenerator.h -- 8 8 // 9 9 // Author : Richard C. Bilson … … 60 60 virtual void visit( MemberExpr *memberExpr ); 61 61 virtual void visit( VariableExpr *variableExpr ); 62 virtual void visit( ConstantExpr *constantExpr ); 62 virtual void visit( ConstantExpr *constantExpr ); 63 63 virtual void visit( SizeofExpr *sizeofExpr ); 64 64 virtual void visit( AlignofExpr *alignofExpr ); … … 85 85 virtual void visit( ForStmt * ); 86 86 virtual void visit( NullStmt * ); 87 virtual void visit( DeclStmt * ); 88 89 void genAttributes( std::list< Attribute * > & attributes ); 87 virtual void visit( DeclStmt * ); 90 88 91 89 template< class Iterator > void genCommaList( Iterator begin, Iterator end ); … … 94 92 Indenter(CodeGenerator &cg) : cg(cg) {} 95 93 CodeGenerator & cg; 96 std::ostream& operator()(std::ostream & os) const; 97 }; 98 99 struct LabelPrinter { 100 LabelPrinter(CodeGenerator &cg) : cg(cg), labels( 0 ) {} 101 LabelPrinter & operator()( std::list< Label > & l ); 102 CodeGenerator & cg; 103 std::list< Label > * labels; 94 std::ostream& operator()(std::ostream & os); 104 95 }; 105 96 … … 115 106 bool insideFunction; 116 107 std::ostream &output; 117 LabelPrinter printLabels;118 108 119 109 void printDesignators( std::list< Expression * > & ); 110 static std::string printLabels ( std::list < Label > & ); 120 111 void handleStorageClass( Declaration *decl ); 121 112 void handleAggregate( AggregateDecl *aggDecl ); … … 123 114 124 115 }; 125 116 126 117 template< class Iterator > 127 118 void CodeGenerator::genCommaList( Iterator begin, Iterator end ) { … … 134 125 } // for 135 126 } 136 127 137 128 inline bool doSemicolon( Declaration* decl ) { 138 129 if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.