summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/TreeTransform.h
diff options
context:
space:
mode:
authorKelvin Li <kkwli0@gmail.com>2015-11-27 18:47:36 +0000
committerKelvin Li <kkwli0@gmail.com>2015-11-27 18:47:36 +0000
commita15fb1a1105b08e6a43993a0e48e92475b4edbbd (patch)
tree9fa4d1e05463c3662f107c46b60a3f19cf7c768a /clang/lib/Sema/TreeTransform.h
parentd08cb6c5283a26d7b2fda44e234b1c814426a3f8 (diff)
downloadbcm5719-llvm-a15fb1a1105b08e6a43993a0e48e92475b4edbbd.tar.gz
bcm5719-llvm-a15fb1a1105b08e6a43993a0e48e92475b4edbbd.zip
[OpenMP] Parsing and sema support for thread_limit clause.
http://reviews.llvm.org/D15029 llvm-svn: 254207
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r--clang/lib/Sema/TreeTransform.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h
index 1ea17981a2d..f839c90da87 100644
--- a/clang/lib/Sema/TreeTransform.h
+++ b/clang/lib/Sema/TreeTransform.h
@@ -1677,6 +1677,18 @@ public:
EndLoc);
}
+ /// \brief Build a new OpenMP 'thread_limit' clause.
+ ///
+ /// By default, performs semantic analysis to build the new statement.
+ /// Subclasses may override this routine to provide different behavior.
+ OMPClause *RebuildOMPThreadLimitClause(Expr *ThreadLimit,
+ SourceLocation StartLoc,
+ SourceLocation LParenLoc,
+ SourceLocation EndLoc) {
+ return getSema().ActOnOpenMPThreadLimitClause(ThreadLimit, StartLoc,
+ LParenLoc, EndLoc);
+ }
+
/// \brief Rebuild the operand to an Objective-C \@synchronized statement.
///
/// By default, performs semantic analysis to build the new statement.
@@ -7718,6 +7730,16 @@ TreeTransform<Derived>::TransformOMPNumTeamsClause(OMPNumTeamsClause *C) {
E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd());
}
+template <typename Derived>
+OMPClause *
+TreeTransform<Derived>::TransformOMPThreadLimitClause(OMPThreadLimitClause *C) {
+ ExprResult E = getDerived().TransformExpr(C->getThreadLimit());
+ if (E.isInvalid())
+ return nullptr;
+ return getDerived().RebuildOMPThreadLimitClause(
+ E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd());
+}
+
//===----------------------------------------------------------------------===//
// Expression transformation
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud