Changeset da09ba1
- Timestamp:
- May 1, 2019, 5:01:29 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 3e96559
- Parents:
- 5157ba7
- Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r5157ba7 rda09ba1 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 1 0:06:00 201913 // Update Count : 49 512 // Last Modified On : Wed May 1 15:50:00 2019 13 // Update Count : 496 14 14 // 15 15 #include "CodeGenerator.h" … … 181 181 functionDecl->get_funcSpec().print( output ); 182 182 183 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), options.pretty, options.genC ); 183 Options subOptions = options; 184 subOptions.inParameterList = true; 185 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), subOptions ); 184 186 185 187 asmName( functionDecl ); … … 200 202 static UniqueName name = { "__anonymous_object" }; 201 203 objectDecl->set_name( name.newName() ); 204 // Stops unused parameter warnings. 205 if ( options.inParameterList ) { 206 objectDecl->attributes.push_back( new Attribute( "unused" ) ); 207 } 202 208 } 203 209 -
src/CodeGen/Options.h
r5157ba7 rda09ba1 10 10 // Created On : Tue Apr 30 11:36:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Wed May 1 09:51:00 201913 // Update Count : 012 // Last Modified On : Wed May 1 15:52:00 2019 13 // Update Count : 1 14 14 // 15 15 … … 24 24 bool printExprTypes; 25 25 26 // Internal Options: Changed on some recurisive calls. 27 bool inParameterList = false; 28 26 29 Options(bool pretty, bool genC, bool lineMarks, bool printExprTypes) : 27 30 pretty(pretty), genC(genC), lineMarks(lineMarks), printExprTypes(printExprTypes)
Note: See TracChangeset
for help on using the changeset viewer.