Changeset e5d9274 for src/CodeGen
- Timestamp:
- Jun 2, 2022, 3:11:21 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- ced5e2a
- Parents:
- 015925a (diff), fc134a48 (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. - Location:
- src/CodeGen
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r015925a re5d9274 1238 1238 } // namespace CodeGen 1239 1239 1240 1241 unsigned Indenter::tabsize = 2;1242 1243 std::ostream & operator<<( std::ostream & out, const BaseSyntaxNode * node ) {1244 if ( node ) {1245 node->print( out );1246 } else {1247 out << "nullptr";1248 }1249 return out;1250 }1251 1252 1240 // Local Variables: // 1253 1241 // tab-width: 4 // -
src/CodeGen/FixMain.cc
r015925a re5d9274 49 49 50 50 } 51 52 bool FixMain::replace_main = false;53 51 54 52 template<typename container> -
src/CodeGen/GenType.cc
r015925a re5d9274 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 1 15:24:00 201913 // Update Count : 2 312 // Last Modified On : Fri May 20 11:18:00 2022 13 // Update Count : 24 14 14 // 15 15 #include "GenType.h" … … 50 50 void postvisit( TraitInstType * inst ); 51 51 void postvisit( TypeofType * typeof ); 52 void postvisit( VTableType * vtable ); 52 53 void postvisit( QualifiedType * qualType ); 53 54 … … 259 260 if ( options.genC ) { 260 261 typeString = "enum " + typeString; 261 } 262 } 262 } 263 } 263 264 handleQualifiers( enumInst ); 264 265 } 265 266 266 267 void GenType::postvisit( TypeInstType * typeInst ) { 268 assertf( ! options.genC, "Type instance types should not reach code generation." ); 267 269 typeString = typeInst->name + " " + typeString; 268 270 handleQualifiers( typeInst ); … … 320 322 } 321 323 324 void GenType::postvisit( VTableType * vtable ) { 325 assertf( ! options.genC, "Virtual table types should not reach code generation." ); 326 std::ostringstream os; 327 os << "vtable(" << genType( vtable->base, "", options ) << ") " << typeString; 328 typeString = os.str(); 329 handleQualifiers( vtable ); 330 } 331 322 332 void GenType::postvisit( QualifiedType * qualType ) { 323 333 assertf( ! options.genC, "Qualified types should not reach code generation." ); -
src/CodeGen/LinkOnce.cc
r015925a re5d9274 53 53 new ConstantExpr( Constant::from_string( section_name ) ) 54 54 ); 55 56 // Unconditionnaly add "visibility(default)" to anything with gnu.linkonce 57 // visibility is a mess otherwise 58 attributes.push_back(new Attribute("visibility", {new ConstantExpr( Constant::from_string( "default" ) )})); 59 55 60 } 56 61 visit_children = false; -
src/CodeGen/module.mk
r015925a re5d9274 10 10 ## Author : Richard C. Bilson 11 11 ## Created On : Mon Jun 1 17:49:17 2015 12 ## Last Modified By : Peter A. Buhr13 ## Last Modified On : Sat Dec 14 07:29:42 201914 ## Update Count : 412 ## Last Modified By : Andrew Beach 13 ## Last Modified On : Tue May 17 14:26:00 2022 14 ## Update Count : 5 15 15 ############################################################################### 16 16 17 #SRC += ArgTweak/Rewriter.cc \ 18 # ArgTweak/Mutate.cc 17 SRC_CODEGEN = \ 18 CodeGen/FixMain2.cc \ 19 CodeGen/FixMain.h \ 20 CodeGen/OperatorTable.cc \ 21 CodeGen/OperatorTable.h 19 22 20 SRC _CODEGEN =\23 SRC += $(SRC_CODEGEN) \ 21 24 CodeGen/CodeGenerator.cc \ 22 25 CodeGen/CodeGenerator.h \ 26 CodeGen/Generate.cc \ 27 CodeGen/Generate.h \ 23 28 CodeGen/FixMain.cc \ 24 CodeGen/FixMain.h \ 29 CodeGen/FixNames.cc \ 30 CodeGen/FixNames.h \ 25 31 CodeGen/GenType.cc \ 26 32 CodeGen/GenType.h \ 27 33 CodeGen/LinkOnce.cc \ 28 34 CodeGen/LinkOnce.h \ 29 CodeGen/OperatorTable.cc \30 CodeGen/OperatorTable.h \31 35 CodeGen/Options.h 32 36 33 SRC += $(SRC_CODEGEN) CodeGen/Generate.cc CodeGen/Generate.h CodeGen/FixNames.cc CodeGen/FixNames.h34 37 SRCDEMANGLE += $(SRC_CODEGEN)
Note:
See TracChangeset
for help on using the changeset viewer.