diff options
author | Michael Wong <fraggamuffin@gmail.com> | 2015-08-07 16:16:36 +0000 |
---|---|---|
committer | Michael Wong <fraggamuffin@gmail.com> | 2015-08-07 16:16:36 +0000 |
commit | e710d5459ee7fc4ffac35e89651611b1498bb1d3 (patch) | |
tree | f588d60e0fc73c26fa8b9b65e74042d976236b45 /clang/lib/Sema/TreeTransform.h | |
parent | 827a40b94420680063477bef5dadf9e69c2140b2 (diff) | |
download | bcm5719-llvm-e710d5459ee7fc4ffac35e89651611b1498bb1d3.tar.gz bcm5719-llvm-e710d5459ee7fc4ffac35e89651611b1498bb1d3.zip |
This patch commits OpenMP 4 target device clauses
This is committed on behalf of Kelvin Li
http://reviews.llvm.org/D11469?id=31227
llvm-svn: 244325
Diffstat (limited to 'clang/lib/Sema/TreeTransform.h')
-rw-r--r-- | clang/lib/Sema/TreeTransform.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/lib/Sema/TreeTransform.h b/clang/lib/Sema/TreeTransform.h index 885dba778f1..6b19bd2ad76 100644 --- a/clang/lib/Sema/TreeTransform.h +++ b/clang/lib/Sema/TreeTransform.h @@ -1596,6 +1596,17 @@ public: StartLoc, LParenLoc, EndLoc); } + /// \brief Build a new OpenMP 'device' clause. + /// + /// By default, performs semantic analysis to build the new statement. + /// Subclasses may override this routine to provide different behavior. + OMPClause *RebuildOMPDeviceClause(Expr *Device, SourceLocation StartLoc, + SourceLocation LParenLoc, + SourceLocation EndLoc) { + return getSema().ActOnOpenMPDeviceClause(Device, StartLoc, LParenLoc, + EndLoc); + } + /// \brief Rebuild the operand to an Objective-C \@synchronized statement. /// /// By default, performs semantic analysis to build the new statement. @@ -7494,6 +7505,16 @@ TreeTransform<Derived>::TransformOMPDependClause(OMPDependClause *C) { C->getLocStart(), C->getLParenLoc(), C->getLocEnd()); } +template <typename Derived> +OMPClause * +TreeTransform<Derived>::TransformOMPDeviceClause(OMPDeviceClause *C) { + ExprResult E = getDerived().TransformExpr(C->getDevice()); + if (E.isInvalid()) + return nullptr; + return getDerived().RebuildOMPDeviceClause( + E.get(), C->getLocStart(), C->getLParenLoc(), C->getLocEnd()); +} + //===----------------------------------------------------------------------===// // Expression transformation //===----------------------------------------------------------------------===// |