[clang] [OpenACC] Private Clause on Compute Constructs (PR #90521)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 30 08:10:18 PDT 2024
================
@@ -134,6 +134,24 @@ OpenACCNumGangsClause *OpenACCNumGangsClause::Create(const ASTContext &C,
return new (Mem) OpenACCNumGangsClause(BeginLoc, LParenLoc, IntExprs, 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);
+}
+
+// ValueDecl *getDeclFromExpr(Expr *RefExpr) {
+// //RefExpr = RefExpr->IgnoreParenImpCasts();
+//
+// ////while (isa<ArraySubscriptExpr, ArraySectionExpr>(RefExpr)) {
+// ////}
+// // TODO:
+// }
+
----------------
erichkeane wrote:
woops! Thanks, good catch!
https://github.com/llvm/llvm-project/pull/90521
More information about the cfe-commits
mailing list