[clang] [CIR][NFC] Add NYI for OMPSplitDirective stmt (PR #190329)

Amr Hesham via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 3 02:49:16 PDT 2026


https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/190329

Fix the warning of missing OMPSplitDirective statement in the emitStmt switch

>From e01d77da56586d2f36b5dcbfba9f072870e279fa Mon Sep 17 00:00:00 2001
From: Amr Hesham <amr96 at programmer.net>
Date: Fri, 3 Apr 2026 11:38:15 +0200
Subject: [PATCH] [CIR][NFC] Add NYI for OMPSplitDirective stmt

---
 clang/lib/CIR/CodeGen/CIRGenFunction.h     | 1 +
 clang/lib/CIR/CodeGen/CIRGenStmt.cpp       | 2 ++
 clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp | 5 +++++
 3 files changed, 8 insertions(+)

diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.h b/clang/lib/CIR/CodeGen/CIRGenFunction.h
index 0bd440a61db20..ccdf3cbd2f0ea 100644
--- a/clang/lib/CIR/CodeGen/CIRGenFunction.h
+++ b/clang/lib/CIR/CodeGen/CIRGenFunction.h
@@ -2223,6 +2223,7 @@ class CIRGenFunction : public CIRGenTypeCache {
   mlir::LogicalResult
   emitOMPGenericLoopDirective(const OMPGenericLoopDirective &s);
   mlir::LogicalResult emitOMPReverseDirective(const OMPReverseDirective &s);
+  mlir::LogicalResult emitOMPSplitDirective(const OMPSplitDirective &s);
   mlir::LogicalResult
   emitOMPInterchangeDirective(const OMPInterchangeDirective &s);
   mlir::LogicalResult emitOMPAssumeDirective(const OMPAssumeDirective &s);
diff --git a/clang/lib/CIR/CodeGen/CIRGenStmt.cpp b/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
index 07d1d62053ea6..fe626726f5017 100644
--- a/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenStmt.cpp
@@ -403,6 +403,8 @@ mlir::LogicalResult CIRGenFunction::emitStmt(const Stmt *s,
     return emitOMPGenericLoopDirective(cast<OMPGenericLoopDirective>(*s));
   case Stmt::OMPReverseDirectiveClass:
     return emitOMPReverseDirective(cast<OMPReverseDirective>(*s));
+  case Stmt::OMPSplitDirectiveClass:
+    return emitOMPSplitDirective(cast<OMPSplitDirective>(*s));
   case Stmt::OMPInterchangeDirectiveClass:
     return emitOMPInterchangeDirective(cast<OMPInterchangeDirective>(*s));
   case Stmt::OMPAssumeDirectiveClass:
diff --git a/clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp b/clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
index 0d3b44db98307..eb4934644b519 100644
--- a/clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
@@ -470,6 +470,11 @@ CIRGenFunction::emitOMPReverseDirective(const OMPReverseDirective &s) {
   return mlir::failure();
 }
 mlir::LogicalResult
+CIRGenFunction::emitOMPSplitDirective(const OMPSplitDirective &s) {
+  getCIRGenModule().errorNYI(s.getSourceRange(), "OpenMP OMPSplitDirective");
+  return mlir::failure();
+}
+mlir::LogicalResult
 CIRGenFunction::emitOMPInterchangeDirective(const OMPInterchangeDirective &s) {
   getCIRGenModule().errorNYI(s.getSourceRange(),
                              "OpenMP OMPInterchangeDirective");



More information about the cfe-commits mailing list