Changeset 2f9a722


Ignore:
Timestamp:
Jun 5, 2017, 10:30:11 AM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
fa21ac9
Parents:
ac032b5
Message:

Forgot to add fix for forward declarations of thread/coroutine/monitors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Concurrency/Keywords.cc

    rac032b5 r2f9a722  
    6565                FunctionDecl * forwardDeclare( StructDecl * );
    6666                ObjectDecl * addField( StructDecl * );
    67                 void addRoutines( StructDecl *, ObjectDecl *, FunctionDecl * );
     67                void addRoutines( ObjectDecl *, FunctionDecl * );
    6868
    6969                virtual bool is_target( StructDecl * decl ) = 0;
     
    247247        void ConcurrentSueKeyword::visit(StructDecl * decl) {
    248248                Visitor::visit(decl);
    249                 if( decl->get_name() == type_name ) {
     249                if( decl->get_name() == type_name && decl->has_body() ) {
    250250                        assert( !type_decl );
    251251                        type_decl = decl;
     
    264264                FunctionDecl * func = forwardDeclare( decl );
    265265                ObjectDecl * field = addField( decl );
    266                 addRoutines( decl, field, func );
     266                addRoutines( field, func );
    267267        }
    268268
     
    359359        }
    360360
    361         void ConcurrentSueKeyword::addRoutines( StructDecl * decl, ObjectDecl * field, FunctionDecl * func ) {
     361        void ConcurrentSueKeyword::addRoutines( ObjectDecl * field, FunctionDecl * func ) {
    362362                CompoundStmt * statement = new CompoundStmt( noLabels );
    363363                statement->push_back(
Note: See TracChangeset for help on using the changeset viewer.