Attributes and types were not escaped when printing.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Could we have a test showing them all the way to C/C++? And is there only subset of characters supported to make the result still legal C/C++ but that's only checked in emitter?
Comment Actions
I will add tests for the emitter now that it has landed, as well as a verifier for the opaque type to check whether it's a valid C identifier.
Comment Actions
Sorry for the delay, I got distracted by other work :)
I additonally changed the type tests to use the template_args attribute because calling a function with a type is not valid C code (i.e. f(int) is not a valid function call).
Regarding the opaque type verifier, I'd suggest to do it in a follow up.
Comment Actions
Looks good thanks
mlir/test/Dialect/EmitC/attrs.mlir | ||
---|---|---|
7 | Could you add a comment here explaining this test a bit more? |
Could you add a comment here explaining this test a bit more?