[Mlir-commits] [mlir] cpdl (PR #95829)

Jacques Pienaar llvmlistbot at llvm.org
Mon Jun 17 11:57:47 PDT 2024


https://github.com/jpienaar updated https://github.com/llvm/llvm-project/pull/95829

>From 573d7f179788b067a0ac6467f5356d944061f5a1 Mon Sep 17 00:00:00 2001
From: Jacques Pienaar <jpienaar at google.com>
Date: Mon, 17 Jun 2024 18:54:00 +0000
Subject: [PATCH] [mlirc] Add missing extern C

Don't know why didn't fail elsewhere, but failed on Windows build while
linking Python libs.

Signed-off-by: Jacques Pienaar <jpienaar at google.com>
---
 mlir/include/mlir-c/Rewrite.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mlir/include/mlir-c/Rewrite.h b/mlir/include/mlir-c/Rewrite.h
index 45218a1cd4ebd..bed93045f4b50 100644
--- a/mlir/include/mlir-c/Rewrite.h
+++ b/mlir/include/mlir-c/Rewrite.h
@@ -19,6 +19,10 @@
 #include "mlir-c/Support.h"
 #include "mlir/Config/mlir-config.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 //===----------------------------------------------------------------------===//
 /// Opaque type declarations (see mlir-c/IR.h for more details).
 //===----------------------------------------------------------------------===//
@@ -57,4 +61,8 @@ mlirRewritePatternSetFromPDLPatternModule(MlirPDLPatternModule op);
 
 #undef DEFINE_C_API_STRUCT
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif // MLIR_C_REWRITE_H



More information about the Mlir-commits mailing list