@@ -598,9 +598,6 @@ OpenACCClause *SemaOpenACCClauseVisitor::VisitDefaultClause(
598598
599599OpenACCClause *SemaOpenACCClauseVisitor::VisitTileClause (
600600 SemaOpenACC::OpenACCParsedClause &Clause) {
601- // TODO OpenACC: Remove this when we get combined construct impl for this.
602- if (Clause.getDirectiveKind () != OpenACCDirectiveKind::Loop)
603- return isNotImplemented ();
604601
605602 // Duplicates here are not really sensible. We could possible permit
606603 // multiples if they all had the same value, but there isn't really a good
@@ -1718,6 +1715,7 @@ void SemaOpenACC::AssociatedStmtRAII::SetTileInfoBeforeAssociatedStmt(
17181715 SemaRef.TileInfo .ActiveTile = TileClause;
17191716 SemaRef.TileInfo .TileDepthSatisfied = false ;
17201717 SemaRef.TileInfo .CurTileCount = TileClause->getSizeExprs ().size ();
1718+ SemaRef.TileInfo .DirectiveKind = DirKind;
17211719}
17221720
17231721SemaOpenACC::AssociatedStmtRAII::~AssociatedStmtRAII () {
@@ -2608,7 +2606,7 @@ void SemaOpenACC::ActOnWhileStmt(SourceLocation WhileLoc) {
26082606
26092607 if (TileInfo.CurTileCount && *TileInfo.CurTileCount > 0 ) {
26102608 Diag (WhileLoc, diag::err_acc_invalid_in_loop)
2611- << /* while loop*/ 1 << OpenACCDirectiveKind::Loop
2609+ << /* while loop*/ 1 << TileInfo. DirectiveKind
26122610 << OpenACCClauseKind::Tile;
26132611 assert (TileInfo.ActiveTile && " tile count without object?" );
26142612 Diag (TileInfo.ActiveTile ->getBeginLoc (), diag::note_acc_active_clause_here)
@@ -2643,8 +2641,7 @@ void SemaOpenACC::ActOnDoStmt(SourceLocation DoLoc) {
26432641
26442642 if (TileInfo.CurTileCount && *TileInfo.CurTileCount > 0 ) {
26452643 Diag (DoLoc, diag::err_acc_invalid_in_loop)
2646- << /* do loop*/ 2 << OpenACCDirectiveKind::Loop
2647- << OpenACCClauseKind::Tile;
2644+ << /* do loop*/ 2 << TileInfo.DirectiveKind << OpenACCClauseKind::Tile;
26482645 assert (TileInfo.ActiveTile && " tile count without object?" );
26492646 Diag (TileInfo.ActiveTile ->getBeginLoc (), diag::note_acc_active_clause_here)
26502647 << OpenACCClauseKind::Tile;
@@ -2692,7 +2689,7 @@ void SemaOpenACC::ForStmtBeginHelper(SourceLocation ForLoc,
26922689
26932690 if (LoopInfo.CurLevelHasLoopAlready ) {
26942691 Diag (ForLoc, diag::err_acc_clause_multiple_loops)
2695- << OpenACCDirectiveKind::Loop << OpenACCClauseKind::Tile;
2692+ << TileInfo. DirectiveKind << OpenACCClauseKind::Tile;
26962693 assert (TileInfo.ActiveTile && " No tile object?" );
26972694 Diag (TileInfo.ActiveTile ->getBeginLoc (),
26982695 diag::note_acc_active_clause_here)
@@ -3203,7 +3200,7 @@ void SemaOpenACC::ActOnForStmtEnd(SourceLocation ForLoc, StmtResult Body) {
32033200
32043201 if (OtherStmtLoc.isValid () && IsActiveTile) {
32053202 Diag (OtherStmtLoc, diag::err_acc_intervening_code)
3206- << OpenACCClauseKind::Tile << OpenACCDirectiveKind::Loop ;
3203+ << OpenACCClauseKind::Tile << TileInfo. DirectiveKind ;
32073204 Diag (TileInfo.ActiveTile ->getBeginLoc (),
32083205 diag::note_acc_active_clause_here)
32093206 << OpenACCClauseKind::Tile;
@@ -3232,7 +3229,7 @@ bool SemaOpenACC::ActOnStartStmtDirective(OpenACCDirectiveKind K,
32323229 }
32333230 if (TileInfo.CurTileCount && *TileInfo.CurTileCount > 0 ) {
32343231 Diag (StartLoc, diag::err_acc_invalid_in_loop)
3235- << /* OpenACC Construct*/ 0 << OpenACCDirectiveKind::Loop
3232+ << /* OpenACC Construct*/ 0 << TileInfo. DirectiveKind
32363233 << OpenACCClauseKind::Tile << K;
32373234 assert (TileInfo.ActiveTile && " Tile count without object?" );
32383235 Diag (TileInfo.ActiveTile ->getBeginLoc (), diag::note_acc_active_clause_here)
0 commit comments