diff options
| author | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-29 15:14:16 +0000 |
|---|---|---|
| committer | Alexey Bataev <a.bataev@hotmail.com> | 2017-11-29 15:14:16 +0000 |
| commit | 95c6dd49a01decd26dcfbb4aaad086538a86a565 (patch) | |
| tree | a1b2f069fa5a1512b7283d059c1264481a56786a /clang/lib/Sema | |
| parent | 02082c39f36fc96fdfccdde18a9f0ea44726e5d2 (diff) | |
| download | bcm5719-llvm-95c6dd49a01decd26dcfbb4aaad086538a86a565.tar.gz bcm5719-llvm-95c6dd49a01decd26dcfbb4aaad086538a86a565.zip | |
[OPENMP] General improvement of handling of `teams distribute`
directive, NFC.
Some general improvements in support of `teams distribute` directive.
llvm-svn: 319320
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index 7e7391d2517..20581af180c 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -7057,14 +7057,24 @@ StmtResult Sema::ActOnOpenMPTeamsDistributeDirective( // 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(); + for (int ThisCaptureLevel = getOpenMPCaptureLevels(OMPD_teams_distribute); + 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(); + } OMPLoopDirective::HelperExprs B; // In presence of clause 'collapse' with number of loops, it will // define the nested loops number. unsigned NestedLoopCount = CheckOpenMPLoop(OMPD_teams_distribute, getCollapseNumberExpr(Clauses), - nullptr /*ordered not a clause on distribute*/, AStmt, - *this, *DSAStack, VarsWithImplicitDSA, B); + nullptr /*ordered not a clause on distribute*/, CS, *this, + *DSAStack, VarsWithImplicitDSA, B); if (NestedLoopCount == 0) return StmtError(); |

