diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-08 08:12:03 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-08 08:12:03 +0000 |
commit | 84d0b3efee509e4c820096772981adeb6568978f (patch) | |
tree | 7f24a3a2722c4f05eef7c831cca58f09281d18cc /clang/lib/Parse/ParseOpenMP.cpp | |
parent | efbce587759f70ad651c98b93e9590751b0e3ce9 (diff) | |
download | bcm5719-llvm-84d0b3efee509e4c820096772981adeb6568978f.tar.gz bcm5719-llvm-84d0b3efee509e4c820096772981adeb6568978f.zip |
[OPENMP] Parsing and sema analysis for 'omp parallel sections' directive.
llvm-svn: 212516
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index a6bc3a2c332..b3a1063ed23 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -40,6 +40,9 @@ static OpenMPDirectiveKind ParseOpenMPDirectiveKind(Parser &P) { if (SDKind == OMPD_for) { P.ConsumeToken(); DKind = OMPD_parallel_for; + } else if (SDKind == OMPD_sections) { + P.ConsumeToken(); + DKind = OMPD_parallel_sections; } } return DKind; @@ -85,6 +88,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_section: case OMPD_single: case OMPD_parallel_for: + case OMPD_parallel_sections: Diag(Tok, diag::err_omp_unexpected_directive) << getOpenMPDirectiveName(DKind); break; @@ -101,7 +105,8 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { /// /// executable-directive: /// annot_pragma_openmp 'parallel' | 'simd' | 'for' | 'sections' | -/// 'section' | 'single' | 'parallel for' {clause} annot_pragma_openmp_end +/// 'section' | 'single' | 'parallel for' | 'parallel sections' {clause} +/// annot_pragma_openmp_end /// StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() { assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); @@ -141,7 +146,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() { case OMPD_sections: case OMPD_single: case OMPD_section: - case OMPD_parallel_for: { + case OMPD_parallel_for: + case OMPD_parallel_sections: { ConsumeToken(); if (isOpenMPLoopDirective(DKind)) |