Changeset 1ed33fed for src/CodeGen/CodeGenerator.h
- Timestamp:
- May 11, 2017, 2:49:34 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 3476a0d
- Parents:
- 6ac2ada (diff), 6a4f3d4 (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.h
r6ac2ada r1ed33fed 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 : Wed Ma r 1 16:20:04201713 // Update Count : 5 011 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 10 10:57:00 2017 13 // Update Count : 51 14 14 // 15 15 … … 25 25 #include "SymTab/Indexer.h" 26 26 27 #include "Common/utility.h" 28 27 29 namespace CodeGen { 28 30 class CodeGenerator : public Visitor { … … 30 32 static int tabsize; 31 33 32 CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false );34 CodeGenerator( std::ostream &os, bool pretty = false, bool genC = false, bool lineMarks = false ); 33 35 CodeGenerator( std::ostream &os, std::string, int indent = 0, bool infun = false ); 34 36 CodeGenerator( std::ostream &os, char *, int indent = 0, bool infun = false ); … … 74 76 virtual void visit( UntypedTupleExpr *tupleExpr ); 75 77 virtual void visit( TupleExpr *tupleExpr ); 78 virtual void visit( TupleIndexExpr * tupleExpr ); 76 79 virtual void visit( TypeExpr *typeExpr ); 77 80 virtual void visit( AsmExpr * ); … … 110 113 }; 111 114 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 112 124 void asmName( DeclarationWithType *decl ); 113 125 … … 122 134 bool pretty = false; // pretty print 123 135 bool genC = false; // true if output has to be C code 136 bool lineMarks = false; 124 137 125 138 void printDesignators( std::list< Expression * > & ); … … 149 162 /// returns C-compatible name of declaration 150 163 std::string genName( DeclarationWithType * decl ); 164 165 std::ostream & operator<<(std::ostream &, 166 CodeGenerator::LineMarker const &); 151 167 } // namespace CodeGen 152 168
Note:
See TracChangeset
for help on using the changeset viewer.