diff options
author | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-15 08:19:24 +0000 |
---|---|---|
committer | Alexey Bataev <a.bataev@hotmail.com> | 2015-12-15 08:19:24 +0000 |
commit | 28c75417b2c48780432eaf5eb35cf7c0a2ad5217 (patch) | |
tree | 8e88b9b6ac7433a5fc459fc538e5072884cf9e0c /clang/lib/Sema/TreeTransform.h | |
parent | cc03b49444cf9053a111c211227d5574354dd8b8 (diff) | |
download | bcm5719-llvm-28c75417b2c48780432eaf5eb35cf7c0a2ad5217.tar.gz bcm5719-llvm-28c75417b2c48780432eaf5eb35cf7c0a2ad5217.zip |
[OPENMP 4.5] Parsing/sema for 'hint' clause of 'critical' directive.
OpenMP 4.5 adds 'hint' clause to critical directive. Patch adds parsing/semantic analysis for this clause.
llvm-svn: 255625
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 39f955b4c1e..200701e13db 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1722,6 +1722,16 @@ public: EndLoc); } + /// \brief Build a new OpenMP 'hint' clause. + /// + /// By default, performs semantic analysis to build the new statement. + /// Subclasses may override this routine to provide different behavior. + OMPClause *RebuildOMPHintClause(Expr *Hint, SourceLocation StartLoc, + SourceLocation LParenLoc, + SourceLocation EndLoc) { + return getSema().ActOnOpenMPHintClause(Hint, StartLoc, LParenLoc, EndLoc); + } + /// \brief Rebuild the operand to an Objective-C \@synchronized statement. /// /// By default, performs semantic analysis to build the new statement. @@ -7843,6 +7853,15 @@ TreeTransform<Derived>::TransformOMPNumTasksClause(OMPNumTasksClause *C) { E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd()); } +template <typename Derived> +OMPClause *TreeTransform<Derived>::TransformOMPHintClause(OMPHintClause *C) { + ExprResult E = getDerived().TransformExpr(C->getHint()); + if (E.isInvalid()) + return nullptr; + return getDerived().RebuildOMPHintClause(E.get(), C->getLocStart(), + C->getLParenLoc(), C->getLocEnd()); +} + //===----------------------------------------------------------------------===// // Expression transformation //===----------------------------------------------------------------------===// |