@@ -3262,6 +3262,12 @@ CHECK_SIMPLE_CLAUSE(Align, OMPC_align)
3262
3262
CHECK_SIMPLE_CLAUSE (Compare, OMPC_compare)
3263
3263
CHECK_SIMPLE_CLAUSE (OmpxAttribute, OMPC_ompx_attribute)
3264
3264
CHECK_SIMPLE_CLAUSE (Weak, OMPC_weak)
3265
+ CHECK_SIMPLE_CLAUSE (AcqRel, OMPC_acq_rel)
3266
+ CHECK_SIMPLE_CLAUSE (Acquire, OMPC_acquire)
3267
+ CHECK_SIMPLE_CLAUSE (Relaxed, OMPC_relaxed)
3268
+ CHECK_SIMPLE_CLAUSE (Release, OMPC_release)
3269
+ CHECK_SIMPLE_CLAUSE (SeqCst, OMPC_seq_cst)
3270
+ CHECK_SIMPLE_CLAUSE (Fail, OMPC_fail)
3265
3271
3266
3272
CHECK_REQ_SCALAR_INT_CLAUSE (NumTeams, OMPC_num_teams)
3267
3273
CHECK_REQ_SCALAR_INT_CLAUSE (NumThreads, OMPC_num_threads)
@@ -3273,53 +3279,6 @@ CHECK_REQ_CONSTANT_SCALAR_INT_CLAUSE(Collapse, OMPC_collapse)
3273
3279
CHECK_REQ_CONSTANT_SCALAR_INT_CLAUSE (Safelen, OMPC_safelen)
3274
3280
CHECK_REQ_CONSTANT_SCALAR_INT_CLAUSE (Simdlen, OMPC_simdlen)
3275
3281
3276
- void OmpStructureChecker::Enter (const parser::OmpClause::AcqRel &) {
3277
- if (!isFailClause)
3278
- CheckAllowedClause (llvm::omp::Clause::OMPC_acq_rel);
3279
- }
3280
-
3281
- void OmpStructureChecker::Enter (const parser::OmpClause::Acquire &) {
3282
- if (!isFailClause)
3283
- CheckAllowedClause (llvm::omp::Clause::OMPC_acquire);
3284
- }
3285
-
3286
- void OmpStructureChecker::Enter (const parser::OmpClause::Release &) {
3287
- if (!isFailClause)
3288
- CheckAllowedClause (llvm::omp::Clause::OMPC_release);
3289
- }
3290
-
3291
- void OmpStructureChecker::Enter (const parser::OmpClause::Relaxed &) {
3292
- if (!isFailClause)
3293
- CheckAllowedClause (llvm::omp::Clause::OMPC_relaxed);
3294
- }
3295
-
3296
- void OmpStructureChecker::Enter (const parser::OmpClause::SeqCst &) {
3297
- if (!isFailClause)
3298
- CheckAllowedClause (llvm::omp::Clause::OMPC_seq_cst);
3299
- }
3300
-
3301
- void OmpStructureChecker::Enter (const parser::OmpClause::Fail &) {
3302
- assert (!isFailClause && " Unexpected FAIL clause inside a FAIL clause?" );
3303
- isFailClause = true ;
3304
- CheckAllowedClause (llvm::omp::Clause::OMPC_fail);
3305
- }
3306
-
3307
- void OmpStructureChecker::Leave (const parser::OmpClause::Fail &) {
3308
- assert (isFailClause && " Expected to be inside a FAIL clause here" );
3309
- isFailClause = false ;
3310
- }
3311
-
3312
- void OmpStructureChecker::Enter (const parser::OmpFailClause &) {
3313
- assert (!isFailClause && " Unexpected FAIL clause inside a FAIL clause?" );
3314
- isFailClause = true ;
3315
- CheckAllowedClause (llvm::omp::Clause::OMPC_fail);
3316
- }
3317
-
3318
- void OmpStructureChecker::Leave (const parser::OmpFailClause &) {
3319
- assert (isFailClause && " Expected to be inside a FAIL clause here" );
3320
- isFailClause = false ;
3321
- }
3322
-
3323
3282
// Restrictions specific to each clause are implemented apart from the
3324
3283
// generalized restrictions.
3325
3284
0 commit comments