summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/StmtOpenMP.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/StmtOpenMP.cpp')
-rw-r--r--clang/lib/AST/StmtOpenMP.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/lib/AST/StmtOpenMP.cpp b/clang/lib/AST/StmtOpenMP.cpp
index b3dfd251692..4ac2ca2abd0 100644
--- a/clang/lib/AST/StmtOpenMP.cpp
+++ b/clang/lib/AST/StmtOpenMP.cpp
@@ -737,6 +737,28 @@ OMPTargetEnterDataDirective::CreateEmpty(const ASTContext &C, unsigned N,
return new (Mem) OMPTargetEnterDataDirective(N);
}
+OMPTargetExitDataDirective *
+OMPTargetExitDataDirective::Create(const ASTContext &C, SourceLocation StartLoc,
+ SourceLocation EndLoc,
+ ArrayRef<OMPClause *> Clauses) {
+ void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetExitDataDirective),
+ llvm::alignOf<OMPClause *>()) +
+ sizeof(OMPClause *) * Clauses.size());
+ OMPTargetExitDataDirective *Dir =
+ new (Mem) OMPTargetExitDataDirective(StartLoc, EndLoc, Clauses.size());
+ Dir->setClauses(Clauses);
+ return Dir;
+}
+
+OMPTargetExitDataDirective *
+OMPTargetExitDataDirective::CreateEmpty(const ASTContext &C, unsigned N,
+ EmptyShell) {
+ void *Mem = C.Allocate(llvm::alignTo(sizeof(OMPTargetExitDataDirective),
+ llvm::alignOf<OMPClause *>()) +
+ sizeof(OMPClause *) * N);
+ return new (Mem) OMPTargetExitDataDirective(N);
+}
+
OMPTeamsDirective *OMPTeamsDirective::Create(const ASTContext &C,
SourceLocation StartLoc,
SourceLocation EndLoc,
OpenPOWER on IntegriCloud