Changes in src/CodeGen/CodeGenerator.h [e04ef3a:888cbe4]
- File:
-
- 1 edited
-
src/CodeGen/CodeGenerator.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.h
re04ef3a r888cbe4 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 * ); 87 virtual void visit( DeclStmt * ); 88 89 void genAttributes( std::list< Attribute * > & attributes ); 88 90 89 91 template< class Iterator > void genCommaList( Iterator begin, Iterator end ); … … 92 94 Indenter(CodeGenerator &cg) : cg(cg) {} 93 95 CodeGenerator & cg; 94 std::ostream& operator()(std::ostream & os); 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; 95 104 }; 96 105 … … 106 115 bool insideFunction; 107 116 std::ostream &output; 117 LabelPrinter printLabels; 108 118 109 119 void printDesignators( std::list< Expression * > & ); 110 static std::string printLabels ( std::list < Label > & );111 120 void handleStorageClass( Declaration *decl ); 112 121 void handleAggregate( AggregateDecl *aggDecl ); … … 114 123 115 124 }; 116 125 117 126 template< class Iterator > 118 127 void CodeGenerator::genCommaList( Iterator begin, Iterator end ) { … … 125 134 } // for 126 135 } 127 136 128 137 inline bool doSemicolon( Declaration* decl ) { 129 138 if ( FunctionDecl* func = dynamic_cast< FunctionDecl* >( decl ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.