diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-02 11:25:17 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-07-02 11:25:17 +0000 |
commit | 80909878adc79d9f1277373af175041718f05953 (patch) | |
tree | c673079a9bf2cc7e6d7635625bdb1691e162686b /clang/lib/Parse/ParseOpenMP.cpp | |
parent | 3937bc650cad69cbd607ca3ea64ea6623808fc19 (diff) | |
download | bcm5719-llvm-80909878adc79d9f1277373af175041718f05953.tar.gz bcm5719-llvm-80909878adc79d9f1277373af175041718f05953.zip |
[OPENMP 4.0] Initial support for 'omp cancel' construct.
Implemented parsing/sema analysis + (de)serialization.
llvm-svn: 241253
Diffstat (limited to 'clang/lib/Parse/ParseOpenMP.cpp')
-rw-r--r-- | clang/lib/Parse/ParseOpenMP.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseOpenMP.cpp b/clang/lib/Parse/ParseOpenMP.cpp index b1d8f2fd319..0113a3157c2 100644 --- a/clang/lib/Parse/ParseOpenMP.cpp +++ b/clang/lib/Parse/ParseOpenMP.cpp @@ -126,6 +126,7 @@ Parser::DeclGroupPtrTy Parser::ParseOpenMPDeclarativeDirective() { case OMPD_target: case OMPD_teams: case OMPD_cancellation_point: + case OMPD_cancel: Diag(Tok, diag::err_omp_unexpected_directive) << getOpenMPDirectiveName(DKind); break; @@ -196,6 +197,7 @@ Parser::ParseOpenMPDeclarativeOrExecutableDirective(bool StandAloneAllowed) { case OMPD_barrier: case OMPD_taskwait: case OMPD_cancellation_point: + case OMPD_cancel: if (!StandAloneAllowed) { Diag(Tok, diag::err_omp_immediate_directive) << getOpenMPDirectiveName(DKind); @@ -235,7 +237,7 @@ Parser::ParseOpenMPDeclarativeOrExecutableDirective(bool StandAloneAllowed) { } T.consumeClose(); } - } else if (DKind == OMPD_cancellation_point) { + } else if (DKind == OMPD_cancellation_point || DKind == OMPD_cancel) { CancelRegion = ParseOpenMPDirectiveKind(*this); if (Tok.isNot(tok::annot_pragma_openmp_end)) ConsumeToken(); |