Changes in src/Concurrency/Keywords.cc [2f9a722:bf2438c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
r2f9a722 rbf2438c 17 17 #include "Concurrency/Keywords.h" 18 18 19 #include "InitTweak/InitTweak.h" 20 #include "SymTab/AddVisit.h" 21 #include "SynTree/Declaration.h" 22 #include "SynTree/Expression.h" 23 #include "SynTree/Initializer.h" 24 #include "SynTree/Statement.h" 25 #include "SynTree/Type.h" 26 #include "SynTree/Visitor.h" 19 #include <cassert> // for assert 20 #include <string> // for string, operator== 21 22 #include "Common/SemanticError.h" // for SemanticError 23 #include "Common/utility.h" // for deleteAll, map_range 24 #include "InitTweak/InitTweak.h" // for isConstructor 25 #include "Parser/LinkageSpec.h" // for Cforall 26 #include "SymTab/AddVisit.h" // for acceptAndAdd 27 #include "SynTree/Constant.h" // for Constant 28 #include "SynTree/Declaration.h" // for StructDecl, FunctionDecl, ObjectDecl 29 #include "SynTree/Expression.h" // for VariableExpr, ConstantExpr, Untype... 30 #include "SynTree/Initializer.h" // for SingleInit, ListInit, Initializer ... 31 #include "SynTree/Label.h" // for Label 32 #include "SynTree/Statement.h" // for CompoundStmt, DeclStmt, ExprStmt 33 #include "SynTree/Type.h" // for StructInstType, Type, PointerType 34 #include "SynTree/Visitor.h" // for Visitor, acceptAll 35 36 class Attribute; 27 37 28 38 namespace Concurrency { … … 322 332 if( needs_main ) { 323 333 FunctionType * main_type = new FunctionType( noQualifiers, false ); 324 334 325 335 main_type->get_parameters().push_back( this_decl->clone() ); 326 336 … … 361 371 void ConcurrentSueKeyword::addRoutines( ObjectDecl * field, FunctionDecl * func ) { 362 372 CompoundStmt * statement = new CompoundStmt( noLabels ); 363 statement->push_back( 373 statement->push_back( 364 374 new ReturnStmt( 365 375 noLabels, … … 386 396 //============================================================================================= 387 397 void MutexKeyword::visit(FunctionDecl* decl) { 388 Visitor::visit(decl); 398 Visitor::visit(decl); 389 399 390 400 std::list<DeclarationWithType*> mutexArgs = findMutexArgs( decl ); … … 510 520 void ThreadStarter::visit(FunctionDecl * decl) { 511 521 Visitor::visit(decl); 512 522 513 523 if( ! InitTweak::isConstructor(decl->get_name()) ) return; 514 524 … … 528 538 if( ! stmt ) return; 529 539 530 stmt->push_back( 540 stmt->push_back( 531 541 new ExprStmt( 532 542 noLabels,
Note:
See TracChangeset
for help on using the changeset viewer.