summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseOpenMP.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2014-07-08 08:12:03 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2014-07-08 08:12:03 +0000
commit84d0b3efee509e4c820096772981adeb6568978f (patch)
tree7f24a3a2722c4f05eef7c831cca58f09281d18cc /clang/lib/Parse/ParseOpenMP.cpp
parentefbce587759f70ad651c98b93e9590751b0e3ce9 (diff)
downloadbcm5719-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.cpp10
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))
OpenPOWER on IntegriCloud