@@ -47,6 +47,7 @@ bool OpenACCClauseWithSingleIntExpr::classof(const OpenACCClause *C) {
47
47
return OpenACCNumWorkersClause::classof (C) ||
48
48
OpenACCVectorLengthClause::classof (C) ||
49
49
OpenACCDeviceNumClause::classof (C) ||
50
+ OpenACCDefaultAsyncClause::classof (C) ||
50
51
OpenACCVectorClause::classof (C) || OpenACCWorkerClause::classof (C) ||
51
52
OpenACCCollapseClause::classof (C) || OpenACCAsyncClause::classof (C);
52
53
}
@@ -239,6 +240,27 @@ OpenACCDeviceNumClause *OpenACCDeviceNumClause::Create(const ASTContext &C,
239
240
return new (Mem) OpenACCDeviceNumClause (BeginLoc, LParenLoc, IntExpr, EndLoc);
240
241
}
241
242
243
+ OpenACCDefaultAsyncClause::OpenACCDefaultAsyncClause (SourceLocation BeginLoc,
244
+ SourceLocation LParenLoc,
245
+ Expr *IntExpr,
246
+ SourceLocation EndLoc)
247
+ : OpenACCClauseWithSingleIntExpr(OpenACCClauseKind::DefaultAsync, BeginLoc,
248
+ LParenLoc, IntExpr, EndLoc) {
249
+ assert ((IntExpr->isInstantiationDependent () ||
250
+ IntExpr->getType ()->isIntegerType ()) &&
251
+ " default_async expression type not scalar/dependent" );
252
+ }
253
+
254
+ OpenACCDefaultAsyncClause *
255
+ OpenACCDefaultAsyncClause::Create (const ASTContext &C, SourceLocation BeginLoc,
256
+ SourceLocation LParenLoc, Expr *IntExpr,
257
+ SourceLocation EndLoc) {
258
+ void *Mem = C.Allocate (sizeof (OpenACCDefaultAsyncClause),
259
+ alignof (OpenACCDefaultAsyncClause));
260
+ return new (Mem)
261
+ OpenACCDefaultAsyncClause (BeginLoc, LParenLoc, IntExpr, EndLoc);
262
+ }
263
+
242
264
OpenACCWaitClause *OpenACCWaitClause::Create (
243
265
const ASTContext &C, SourceLocation BeginLoc, SourceLocation LParenLoc,
244
266
Expr *DevNumExpr, SourceLocation QueuesLoc, ArrayRef<Expr *> QueueIdExprs,
@@ -575,6 +597,13 @@ void OpenACCClausePrinter::VisitDeviceNumClause(
575
597
OS << " )" ;
576
598
}
577
599
600
+ void OpenACCClausePrinter::VisitDefaultAsyncClause (
601
+ const OpenACCDefaultAsyncClause &C) {
602
+ OS << " default_async(" ;
603
+ printExpr (C.getIntExpr ());
604
+ OS << " )" ;
605
+ }
606
+
578
607
void OpenACCClausePrinter::VisitAsyncClause (const OpenACCAsyncClause &C) {
579
608
OS << " async" ;
580
609
if (C.hasIntExpr ()) {
0 commit comments