-
Hi I am attempting to call printf and I believe that requires me to declare it, so something like this: func @printf(i8) At least that is my interpretation from https://mlir.llvm.org/docs/Dialects/Func/#funcfunc-funcfuncop. I am a bit stuck on how to do that with melior. I have tried a few things with Thanks for the awesome crate! TLDR: How can I declare external functions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can pass an empty region as a body of the See also #292. |
Beta Was this translation helpful? Give feedback.
You can pass an empty region as a body of the
func.func
operation (i.e.Region::new()
.) BTW, the example in the documentation seems to be wrong as FAQ and symbol visibility documentation actually says external function definitions must haveprivate
visibility. https://mlir.llvm.org/getting_started/Faq/#whats-with-op-symbol-declaration-cannot-have-public-visibilitySee also #292.