summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtOpenMP.cpp
diff options
context:
space:
mode:
authorSamuel Antao <sfantao@us.ibm.com>2016-01-19 19:15:56 +0000
committerSamuel Antao <sfantao@us.ibm.com>2016-01-19 19:15:56 +0000
commitdf67fc468eb34e9fc8b79be8f55fada8322eaadd (patch)
treec5aaa5155699d7126c274ff80debf90be84e7d66 /clang/lib/AST/StmtOpenMP.cpp
parent251cf1336ae7b670991dcb1499d8b6b52864cf7b (diff)
downloadbcm5719-llvm-df67fc468eb34e9fc8b79be8f55fada8322eaadd.tar.gz
bcm5719-llvm-df67fc468eb34e9fc8b79be8f55fada8322eaadd.zip
[OpenMP] Parsing + sema for "target enter data" directive.
Patch by Arpith Jacob. Thanks! llvm-svn: 258165
Diffstat (limited to 'clang/lib/AST/StmtOpenMP.cpp')
-rw-r--r--clang/lib/AST/StmtOpenMP.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp
index 72e62b7001d..b3dfd251692 100644
--- a/clang/lib/AST/StmtOpenMP.cpp
+++ b/clang/lib/AST/StmtOpenMP.cpp
@@ -716,6 +716,27 @@ OMPTargetDataDirective *OMPTargetDataDirective::CreateEmpty(const ASTContext &C,
return new (Mem) OMPTargetDataDirective(N);
}
+OMPTargetEnterDataDirective *OMPTargetEnterDataDirective::Create(
+ const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc,
+ ArrayRef<OMPClause *> Clauses) {
+ void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetEnterDataDirective),
+ llvm::alignOf<OMPClause *>()) +
+ sizeof(OMPClause *) * Clauses.size());
+ OMPTargetEnterDataDirective *Dir =
+ new (Mem) OMPTargetEnterDataDirective(StartLoc, EndLoc, Clauses.size());
+ Dir->setClauses(Clauses);
+ return Dir;
+}
+
+OMPTargetEnterDataDirective *
+OMPTargetEnterDataDirective::CreateEmpty(const ASTContext &C, unsigned N,
+ EmptyShell) {
+ void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetEnterDataDirective),
+ llvm::alignOf<OMPClause *>()) +
+ sizeof(OMPClause *) * N);
+ return new (Mem) OMPTargetEnterDataDirective(N);
+}
+
OMPTeamsDirective *OMPTeamsDirective::Create(const ASTContext &C,
SourceLocation StartLoc,
SourceLocation EndLoc,
OpenPOWER on IntegriCloud