diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-22 14:25:55 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-22 14:25:55 +0000 |
| commit | f9fc42e50b5dfe1d12036f1da5381b4c7a9f7be3 (patch) | |
| tree | 7c4fc550504480983f6fed750d933b77ffa360e2 /clang/lib/Sema | |
| parent | 6be1e3da1e9ff1c18b880f422fd2bf561fdc23ae (diff) | |
| download | bcm5719-llvm-f9fc42e50b5dfe1d12036f1da5381b4c7a9f7be3.tar.gz bcm5719-llvm-f9fc42e50b5dfe1d12036f1da5381b4c7a9f7be3.zip | |
[OPENMP] Codegen for `target teams` directive.
Added codegen of the clauses for `target teams` directive.
llvm-svn: 318834
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 771cd8452b0..6c56d0c185a 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -7182,6 +7182,16 @@ StmtResult Sema::ActOnOpenMPTargetTeamsDirective(ArrayRef<OMPClause *> Clauses, // longjmp() and throw() must not violate the entry/exit criteria. CS->getCapturedDecl()->setNothrow(); + for (int ThisCaptureLevel = getOpenMPCaptureLevels(OMPD_target_teams); + ThisCaptureLevel > 1; --ThisCaptureLevel) { + CS = cast<CapturedStmt>(CS->getCapturedStmt()); + // 1.2.2 OpenMP Language Terminology + // Structured block - An executable statement with a single entry at the + // top and a single exit at the bottom. + // The point of exit cannot be a branch out of the structured block. + // longjmp() and throw() must not violate the entry/exit criteria. + CS->getCapturedDecl()->setNothrow(); + } getCurFunction()->setHasBranchProtectedScope(); return OMPTargetTeamsDirective::Create(Context, StartLoc, EndLoc, Clauses, |

