diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-25 11:44:49 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-06-25 11:44:49 +0000 |
commit | 71f61a886646fca18a9dbed747ff34b0faa0dc98 (patch) | |
tree | 9cf6bd28790e4ce856530984d227bf1f316c5e71 /lib/Parse/ParseOpenMP.cpp | |
parent | ab6dc444704d6f49ebc9ed60cc9fec0ec034b384 (diff) | |
download | clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.gz clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.bz2 clang-71f61a886646fca18a9dbed747ff34b0faa0dc98.tar.xz |
[OPENMP] Initial support for 'sections' directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211685 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | lib/Parse/ParseOpenMP.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Parse/ParseOpenMP.cpp b/lib/Parse/ParseOpenMP.cpp index 5a5e15a5e4..7a3c05e96b 100644 --- a/lib/Parse/ParseOpenMP.cpp +++ b/lib/Parse/ParseOpenMP.cpp @@ -63,6 +63,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_simd: case OMPD_task: case OMPD_for: + case OMPD_sections: Diag(Tok, diag::err_omp_unexpected_directive) << getOpenMPDirectiveName(DKind); break; @@ -77,8 +78,9 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { /// annot_pragma_openmp 'threadprivate' simple-variable-list /// annot_pragma_openmp_end /// -/// parallel-directive: -/// annot_pragma_openmp 'parallel' {clause} annot_pragma_openmp_end +/// executable-directive: +/// annot_pragma_openmp 'parallel'|'simd'|'for'|'sections' {clause} +/// annot_pragma_openmp_end /// StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() { assert(Tok.is(tok::annot_pragma_openmp) && "Not an OpenMP directive!"); @@ -116,7 +118,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective() { break; case OMPD_parallel: case OMPD_simd: - case OMPD_for: { + case OMPD_for: + case OMPD_sections: { ConsumeToken(); if (isOpenMPLoopDirective(DKind)) |