[Mlir-commits] [mlir] [mlir] Support better printing for mutually recursive types (PR #112160)
Markus Böck
llvmlistbot at llvm.org
Mon Oct 14 00:03:36 PDT 2024
================
@@ -525,7 +529,7 @@ void TestRecursiveAliasType::print(AsmPrinter &printer) const {
printer.tryStartCyclicPrint(*this);
----------------
zero9178 wrote:
Would it make sense for `hasFutureAlias` to not be exposed to users at all, but rather be used in the implementation of `tryStartCyclicPrint`? That method is already meant to instruct the user's print implementation whether to print a forward declaration or not. The `hasFutureAlias` condition to me seems like it should be an improvement of that.
If there is a risk of users not wanting this behaviour we could just add a boolean flag disabling it to `tryStartCyclicPrint`.
Not exposing `hasFutureAlias` would also help keep the parse more context insensitive.
https://github.com/llvm/llvm-project/pull/112160
More information about the Mlir-commits
mailing list