-
Notifications
You must be signed in to change notification settings - Fork 12.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mlirc] Add missing extern C #95829
[mlirc] Add missing extern C #95829
Conversation
@llvm/pr-subscribers-mlir Author: Jacques Pienaar (jpienaar) Changes
Full diff: https://github.com/llvm/llvm-project/pull/95829.diff 1 Files Affected:
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
|
Don't know why didn't fail elsewhere, but failed on Windows build while linking Python libs. Signed-off-by: Jacques Pienaar <jpienaar@google.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -57,4 +61,8 @@ mlirRewritePatternSetFromPDLPatternModule(MlirPDLPatternModule op); | |||
|
|||
#undef DEFINE_C_API_STRUCT | |||
|
|||
#ifdef __cplusplus | |||
} | |||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is any of these covered by C unit-tests?
This was missing being wrapped in extern C block. Don't know why didn't fail elsewhere, but failed on Windows build while linking Python libs. Signed-off-by: Jacques Pienaar <jpienaar@google.com>
This was missing being wrapped in extern C block.
Don't know why didn't fail elsewhere, but failed on Windows build while linking Python libs.