- Timestamp:
- May 2, 2019, 1:57:05 PM (5 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:
- 62ce290
- Parents:
- 3e96559
- Location:
- src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r3e96559 r76f7fc7 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:50:00 201913 // Update Count : 49 612 // Last Modified On : Thr May 2 10:47:00 2019 13 // Update Count : 497 14 14 // 15 15 #include "CodeGenerator.h" … … 182 182 183 183 Options subOptions = options; 184 subOptions. inParameterList = true;184 subOptions.anonymousUnused = functionDecl->has_body(); 185 185 output << genType( functionDecl->get_functionType(), mangleName( functionDecl ), subOptions ); 186 186 … … 203 203 objectDecl->set_name( name.newName() ); 204 204 // Stops unused parameter warnings. 205 if ( options. inParameterList) {205 if ( options.anonymousUnused ) { 206 206 objectDecl->attributes.push_back( new Attribute( "unused" ) ); 207 207 } -
src/CodeGen/Options.h
r3e96559 r76f7fc7 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 15:52:00 201913 // Update Count : 112 // Last Modified On : Thr May 2 10:45:00 2019 13 // Update Count : 2 14 14 // 15 15 … … 25 25 26 26 // Internal Options: Changed on some recurisive calls. 27 bool inParameterList= false;27 bool anonymousUnused = false; 28 28 29 29 Options(bool pretty, bool genC, bool lineMarks, bool printExprTypes) : -
src/SynTree/Declaration.h
r3e96559 r76f7fc7 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 May 1 07:46:49201913 // Update Count : 13 411 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr May 2 10:47:00 2019 13 // Update Count : 135 14 14 // 15 15 … … 167 167 CompoundStmt *get_statements() const { return statements; } 168 168 void set_statements( CompoundStmt *newValue ) { statements = newValue; } 169 bool has_body() const { return NULL != statements; } 169 170 170 171 static FunctionDecl * newFunction( const std::string & name, FunctionType * type, CompoundStmt * statements );
Note: See TracChangeset
for help on using the changeset viewer.