Replace MlirDialectRegistrationHooks with MlirDialectHandle, which under-the-hood is an opaque pointer to MlirDialectRegistrationHooks. Then we expose the functionality previously directly on MlirDialectRegistrationHooks, as functions which take the opaque MlirDialectHandle struct. This makes the actual structure of the registration hooks an implementation detail, and happens to avoid this issue: https://llvm.discourse.group/t/strange-swift-issues-with-dialect-registration-hooks/2759/3
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir-c/Registration.h | ||
---|---|---|
41 | We can also just make this a symbol instead of a function. |
mlir/lib/CAPI/IR/DialectHandle.cpp | ||
---|---|---|
11 | I'm not an expert in C++, but I'm not sure this would work as MlirDialectRegistrationHooks is a C type. I have changed the name instead. |
mlir/lib/CAPI/IR/DialectHandle.cpp | ||
---|---|---|
11 | Nevermind, I thought you meant something different. Just changing the name to unwrap works. |
We can also just make this a symbol instead of a function.