[clang] [OpenMP] Add runtime selection for metadirective with non-constant conditions. (PR #192455)

Alexey Bataev via cfe-commits cfe-commits at lists.llvm.org
Sat May 9 06:49:56 PDT 2026


================
@@ -761,8 +761,36 @@ void StmtPrinter::PrintOMPExecutableDirective(OMPExecutableDirective *S,
 }
 
 void StmtPrinter::VisitOMPMetaDirective(OMPMetaDirective *Node) {
+  if (Node->getNumVariants() == 0) {
+    Indent() << "#pragma omp metadirective" << NL;
+    if (Stmt *If = Node->getIfStmt())
+      PrintStmt(If);
+  }
----------------
alexey-bataev wrote:

```suggestion
    return;
  }
```

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


More information about the cfe-commits mailing list