diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-21 11:14:16 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-08-21 11:14:16 +0000 |
commit | 66b15b505fe1af2eb570e35a98b3acbd4b6d38e5 (patch) | |
tree | d544c8df86cb5a2ed9132b5011e17a8ad48c3731 /clang/lib/Sema/TreeTransform.h | |
parent | b3b1f467cea319c24ce5065881b874fa5afe4cb6 (diff) | |
download | bcm5719-llvm-66b15b505fe1af2eb570e35a98b3acbd4b6d38e5.tar.gz bcm5719-llvm-66b15b505fe1af2eb570e35a98b3acbd4b6d38e5.zip |
[OPENMP 4.1] Initial support for 'simdlen' clause.
Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter.
llvm-svn: 245692
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 7cc7b779724..7c2c2a587a6 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1395,6 +1395,16 @@ public: return getSema().ActOnOpenMPSafelenClause(Len, StartLoc, LParenLoc, EndLoc); } + /// \brief Build a new OpenMP 'simdlen' clause. + /// + /// By default, performs semantic analysis to build the new OpenMP clause. + /// Subclasses may override this routine to provide different behavior. + OMPClause *RebuildOMPSimdlenClause(Expr *Len, SourceLocation StartLoc, + SourceLocation LParenLoc, + SourceLocation EndLoc) { + return getSema().ActOnOpenMPSimdlenClause(Len, StartLoc, LParenLoc, EndLoc); + } + /// \brief Build a new OpenMP 'collapse' clause. /// /// By default, performs semantic analysis to build the new OpenMP clause. @@ -7221,6 +7231,16 @@ TreeTransform<Derived>::TransformOMPSafelenClause(OMPSafelenClause *C) { template <typename Derived> OMPClause * +TreeTransform<Derived>::TransformOMPSimdlenClause(OMPSimdlenClause *C) { + ExprResult E = getDerived().TransformExpr(C->getSimdlen()); + if (E.isInvalid()) + return nullptr; + return getDerived().RebuildOMPSimdlenClause( + E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd()); +} + +template <typename Derived> +OMPClause * TreeTransform<Derived>::TransformOMPCollapseClause(OMPCollapseClause *C) { ExprResult E = getDerived().TransformExpr(C->getNumForLoops()); if (E.isInvalid()) |