diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-22 10:10:35 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2014-07-22 10:10:35 +0000 |
commit | 0162e459efac896816898588f6bbcf1fae43df41 (patch) | |
tree | 57ff192fe3ebc50146104d8f26269f0646ff3e3b /clang/lib/Parse/ParseOpenMP.cpp | |
parent | 9fb6e647e71678341e7a344051df439a1020aaf4 (diff) | |
download | bcm5719-llvm-0162e459efac896816898588f6bbcf1fae43df41.tar.gz bcm5719-llvm-0162e459efac896816898588f6bbcf1fae43df41.zip |
[OPENMP] Initial parsing and sema analysis for 'atomic' directive.
llvm-svn: 213639
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index 9afe26cee15..f5ccb7c14e4 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -96,6 +96,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_critical: case OMPD_parallel_for: case OMPD_parallel_sections: + case OMPD_atomic: Diag(Tok, diag::err_omp_unexpected_directive) << getOpenMPDirectiveName(DKind); break; @@ -114,7 +115,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { /// annot_pragma_openmp 'parallel' | 'simd' | 'for' | 'sections' | /// 'section' | 'single' | 'master' | 'critical' [ '(' <name> ')' ] | /// 'parallel for' | 'parallel sections' | 'task' | 'taskyield' | -/// 'barrier' | 'taskwait' | 'flush' | 'ordered' {clause} +/// 'barrier' | 'taskwait' | 'flush' | 'ordered' | 'atomic' {clause} /// annot_pragma_openmp_end /// StmtResult @@ -179,7 +180,8 @@ Parser::ParseOpenMPDeclarativeOrExecutableDirective(bool StandAloneAllowed) { case OMPD_parallel_for: case OMPD_parallel_sections: case OMPD_task: - case OMPD_ordered: { + case OMPD_ordered: + case OMPD_atomic: { ConsumeToken(); // Parse directive name of the 'critical' directive if any. if (DKind == OMPD_critical) { |