Changeset b067d9b for src/Concurrency/Keywords.cc
- Timestamp:
- Oct 29, 2019, 4:01:24 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 773db65, 9421f3d8
- Parents:
- 7951100 (diff), 8364209 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Concurrency/Keywords.cc
r7951100 rb067d9b 97 97 "__thrd", 98 98 "get_thread", 99 "thread keyword requires threads to be in scope, add #include <thread >",99 "thread keyword requires threads to be in scope, add #include <thread.hfa>", 100 100 true, 101 101 KeywordCastExpr::Thread … … 129 129 "__cor", 130 130 "get_coroutine", 131 "coroutine keyword requires coroutines to be in scope, add #include <coroutine >",131 "coroutine keyword requires coroutines to be in scope, add #include <coroutine.hfa>", 132 132 true, 133 133 KeywordCastExpr::Coroutine … … 161 161 "__mon", 162 162 "get_monitor", 163 "monitor keyword requires monitors to be in scope, add #include <monitor >",163 "monitor keyword requires monitors to be in scope, add #include <monitor.hfa>", 164 164 false, 165 165 KeywordCastExpr::Monitor … … 488 488 // Do we have the required headers 489 489 if( !monitor_decl || !guard_decl || !dtor_guard_decl ) 490 SemanticError( decl, "mutex keyword requires monitors to be in scope, add #include <monitor >\n" );490 SemanticError( decl, "mutex keyword requires monitors to be in scope, add #include <monitor.hfa>\n" ); 491 491 492 492 // Instrument the body … … 501 501 void MutexKeyword::postvisit(StructDecl* decl) { 502 502 503 if( decl->name == "monitor_desc" ) {503 if( decl->name == "monitor_desc" && decl->body ) { 504 504 assert( !monitor_decl ); 505 505 monitor_decl = decl; 506 506 } 507 else if( decl->name == "monitor_guard_t" ) {507 else if( decl->name == "monitor_guard_t" && decl->body ) { 508 508 assert( !guard_decl ); 509 509 guard_decl = decl; 510 510 } 511 else if( decl->name == "monitor_dtor_guard_t" ) {511 else if( decl->name == "monitor_dtor_guard_t" && decl->body ) { 512 512 assert( !dtor_guard_decl ); 513 513 dtor_guard_decl = decl; … … 575 575 576 576 //in reverse order : 577 // monitor_ guard_t __guard = { __monitors, #, func };577 // monitor_dtor_guard_t __guard = { __monitors, func }; 578 578 body->push_front( 579 579 new DeclStmt( new ObjectDecl( … … 634 634 assert(generic_func); 635 635 636 // in reverse order :636 // in reverse order : 637 637 // monitor_guard_t __guard = { __monitors, #, func }; 638 638 body->push_front( … … 685 685 if( type && type->get_baseStruct()->is_thread() ) { 686 686 if( !thread_decl || !thread_ctor_seen ) { 687 SemanticError( type->get_baseStruct()->location, "thread keyword requires threads to be in scope, add #include <thread >");687 SemanticError( type->get_baseStruct()->location, "thread keyword requires threads to be in scope, add #include <thread.hfa>"); 688 688 } 689 689
Note:
See TracChangeset
for help on using the changeset viewer.