[clang] [OpenACC] Implement 'num_workers' clause for compute constructs (PR #89151)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 18 06:53:51 PDT 2024


================
@@ -156,6 +156,64 @@ class OpenACCSelfClause : public OpenACCClauseWithCondition {
                                    Expr *ConditionExpr, SourceLocation EndLoc);
 };
 
+/// Represents one of a handful of classes that have integer expressions.
+/// Semantically, many only permit a single expression, with a few that permit
+/// up to 3.
+class OpenACCClauseWithIntExprs : public OpenACCClauseWithParams {
+  llvm::SmallVector<Expr *> IntExprs;
----------------
erichkeane wrote:

I moved this closer to tail-allocation.  I didn't see value in doing this with tail-allocation in THIS case because it is just a single `Expr`.  However, I changed this class to work correctly when I inherit from it directly with 'trailing' storage.

https://github.com/llvm/llvm-project/pull/89151


More information about the cfe-commits mailing list