================
@@ -25,7 +25,8 @@ include "mlir/IR/BuiltinTypeInterfaces.td"
 // Base class for Builtin dialect types.
 class Builtin_Type<string name, string typeMnemonic, list<Trait> traits = [],
                    string baseCppClass = "::mlir::Type">
-    : TypeDef<Builtin_Dialect, name, traits, baseCppClass> {
+    : TypeDef<Builtin_Dialect, name, !listconcat(traits, [PrintTypeQualified]),
----------------
zero9178 wrote:

The best example as to why this is needed is probably `complex`. Not using 
`PrintTypeQualified` means changing the syntax of ALL operations in the complex 
dialect as they all suddenly use the unqualified syntax. 
Additionally, `parseCustomTypeWithFallback` currently does not handle the 
builtin types correctly if written verbose (e.g. `complex<f32>`) since the 
logic currently assumes that verbose types always lead with the dialect name 
(`!builtin`).
I tried a bit what logic changes would be required and did not find an obvious 
answer. It therefore also breaks existing input parsing.
So to summarize:
* To stay compatible with existing syntax and tests and avoid creating massive 
churn
* To avoid incompatiblity with the current implementation of stripped parsing 
and printing

If you like I can take a closer look at fixing `parseCustomTypeWithFallback` 
here, but thought I'd rather make that a future PR to keep this one backwards 
compatible.

https://github.com/llvm/llvm-project/pull/80421
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to