Changes in src/CodeGen/CodeGenerator.h [d104b02:5809461]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.h
rd104b02 r5809461 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Tus Jul 25 25:30:00 201713 // Update Count : 5 412 // Last Modified On : Fri Aug 18 15:40:00 2017 13 // Update Count : 56 14 14 // 15 15 … … 21 21 22 22 #include "Common/Indenter.h" // for Indenter 23 24 23 #include "SynTree/Declaration.h" // for DeclarationWithType (ptr only), Fun... 25 24 #include "SynTree/Visitor.h" // for Visitor 26 25 #include "SynTree/SynTree.h" // for Visitor Nodes 27 28 #include "Common/Indenter.h" // for Indenter29 26 30 27 namespace CodeGen { … … 62 59 virtual void visit( NameExpr *nameExpr ); 63 60 virtual void visit( AddressExpr *addressExpr ); 61 virtual void visit( LabelAddressExpr *addressExpr ); 64 62 virtual void visit( CastExpr *castExpr ); 65 63 virtual void visit( VirtualCastExpr *castExpr ); … … 113 111 }; 114 112 115 struct LineMarker {116 CodeLocation const & loc;117 bool toPrint;118 119 LineMarker(CodeLocation const & loc, bool toPrint);120 };121 122 LineMarker lineDirective(BaseSyntaxNode const * node);123 124 113 void asmName( DeclarationWithType *decl ); 125 114 126 115 void extension( Expression *expr ); 127 116 void extension( Declaration *decl ); 117 118 void updateLocation( BaseSyntaxNode const * to ); 128 119 private: 129 120 Indenter indent; … … 134 125 bool genC = false; // true if output has to be C code 135 126 bool lineMarks = false; 127 128 CodeLocation currentLocation; 129 void updateLocation( CodeLocation const & to ); 130 void nextLine(); 136 131 137 132 void handleStorageClass( DeclarationWithType *decl ); … … 160 155 /// returns C-compatible name of declaration 161 156 std::string genName( DeclarationWithType * decl ); 162 163 std::ostream & operator<<(std::ostream &,164 CodeGenerator::LineMarker const &);165 157 } // namespace CodeGen 166 158
Note: See TracChangeset
for help on using the changeset viewer.