aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/OpenACCClause.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/OpenACCClause.cpp')
-rw-r--r--clang/lib/AST/OpenACCClause.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/clang/lib/AST/OpenACCClause.cpp b/clang/lib/AST/OpenACCClause.cpp
index 60ec10a..f7a98bd 100644
--- a/clang/lib/AST/OpenACCClause.cpp
+++ b/clang/lib/AST/OpenACCClause.cpp
@@ -314,23 +314,28 @@ OpenACCTileClause *OpenACCTileClause::Create(const ASTContext &C,
return new (Mem) OpenACCTileClause(BeginLoc, LParenLoc, SizeExprs, EndLoc);
}
-OpenACCPrivateClause *OpenACCPrivateClause::Create(const ASTContext &C,
- SourceLocation BeginLoc,
- SourceLocation LParenLoc,
- ArrayRef<Expr *> VarList,
- SourceLocation EndLoc) {
- void *Mem = C.Allocate(
- OpenACCPrivateClause::totalSizeToAlloc<Expr *>(VarList.size()));
- return new (Mem) OpenACCPrivateClause(BeginLoc, LParenLoc, VarList, EndLoc);
+OpenACCPrivateClause *
+OpenACCPrivateClause::Create(const ASTContext &C, SourceLocation BeginLoc,
+ SourceLocation LParenLoc, ArrayRef<Expr *> VarList,
+ ArrayRef<VarDecl *> InitRecipes,
+ SourceLocation EndLoc) {
+ assert(VarList.size() == InitRecipes.size());
+ void *Mem =
+ C.Allocate(OpenACCPrivateClause::totalSizeToAlloc<Expr *, VarDecl *>(
+ VarList.size(), InitRecipes.size()));
+ return new (Mem)
+ OpenACCPrivateClause(BeginLoc, LParenLoc, VarList, InitRecipes, EndLoc);
}
OpenACCFirstPrivateClause *OpenACCFirstPrivateClause::Create(
const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
- ArrayRef<Expr *> VarList, SourceLocation EndLoc) {
- void *Mem = C.Allocate(
- OpenACCFirstPrivateClause::totalSizeToAlloc<Expr *>(VarList.size()));
- return new (Mem)
- OpenACCFirstPrivateClause(BeginLoc, LParenLoc, VarList, EndLoc);
+ ArrayRef<Expr *> VarList, ArrayRef<VarDecl *> InitRecipes,
+ SourceLocation EndLoc) {
+ void *Mem =
+ C.Allocate(OpenACCFirstPrivateClause::totalSizeToAlloc<Expr *, VarDecl *>(
+ VarList.size(), InitRecipes.size()));
+ return new (Mem) OpenACCFirstPrivateClause(BeginLoc, LParenLoc, VarList,
+ InitRecipes, EndLoc);
}
OpenACCAttachClause *OpenACCAttachClause::Create(const ASTContext &C,