[llvm-branch-commits] [clang] [flang] [llvm] [Clang][OpenMP] Add permutation clause (PR #92030)

Alexey Bataev via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed May 22 06:03:43 PDT 2024


================
@@ -1774,6 +1793,18 @@ void OMPClausePrinter::VisitOMPSizesClause(OMPSizesClause *Node) {
   OS << ")";
 }
 
+void OMPClausePrinter::VisitOMPPermutationClause(OMPPermutationClause *Node) {
+  OS << "permutation(";
+  bool First = true;
+  for (Expr *Size : Node->getArgsRefs()) {
+    if (!First)
+      OS << ", ";
+    Size->printPretty(OS, nullptr, Policy, 0);
+    First = false;
+  }
----------------
alexey-bataev wrote:

`llvm::interleaveComma(Node->getArgsRefs(), OS,
                        [&](const Expr *E) { E->printPretty(OS, nullptr, Policy, 0); });`

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


More information about the llvm-branch-commits mailing list