summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/Stmt.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2013-10-01 05:32:34 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2013-10-01 05:32:34 +0000
commitd5af8e472d6016f3dca2a33fa9d92bcf35aad43b (patch)
tree833c55056134f116b594e8e3db9a3c64d0e7ec03 /clang/lib/AST/Stmt.cpp
parentde111a425c0a8e38e4a60f1c5ca310546717a876 (diff)
downloadbcm5719-llvm-d5af8e472d6016f3dca2a33fa9d92bcf35aad43b.tar.gz
bcm5719-llvm-d5af8e472d6016f3dca2a33fa9d92bcf35aad43b.zip
[OpenMP] Added parsing and semantic analysis for firstprivate clause
llvm-svn: 191730
Diffstat (limited to 'clang/lib/AST/Stmt.cpp')
-rw-r--r--clang/lib/AST/Stmt.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 03215927440..de851615cb7 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -1145,6 +1145,29 @@ OMPPrivateClause *OMPPrivateClause::CreateEmpty(const ASTContext &C,
return new (Mem) OMPPrivateClause(N);
}
+OMPFirstprivateClause *OMPFirstprivateClause::Create(const ASTContext &C,
+ SourceLocation StartLoc,
+ SourceLocation LParenLoc,
+ SourceLocation EndLoc,
+ ArrayRef<Expr *> VL) {
+ void *Mem = C.Allocate(sizeof(OMPFirstprivateClause) +
+ sizeof(Expr *) * VL.size(),
+ llvm::alignOf<OMPFirstprivateClause>());
+ OMPFirstprivateClause *Clause = new (Mem) OMPFirstprivateClause(StartLoc,
+ LParenLoc,
+ EndLoc,
+ VL.size());
+ Clause->setVarRefs(VL);
+ return Clause;
+}
+
+OMPFirstprivateClause *OMPFirstprivateClause::CreateEmpty(const ASTContext &C,
+ unsigned N) {
+ void *Mem = C.Allocate(sizeof(OMPFirstprivateClause) + sizeof(Expr *) * N,
+ llvm::alignOf<OMPFirstprivateClause>());
+ return new (Mem) OMPFirstprivateClause(N);
+}
+
OMPSharedClause *OMPSharedClause::Create(const ASTContext &C,
SourceLocation StartLoc,
SourceLocation LParenLoc,
OpenPOWER on IntegriCloud