This is an archive of the discontinued LLVM Phabricator instance.

[mlir][tblgen] Emit interface decls in definition order in the .td file
ClosedPublic

Authored by springerm on Apr 6 2023, 1:31 AM.

Details

Summary

Interface decls were previously sorted by name. This lead to problems when using interface inheritance when both interfaces are defined in the same .td file. The derived interface must appear after the base interface, otherwise the generated C++ will not compile.

With this change, interfaces will compile as long as the base interface is defined before derived interfaces in the .td file.

Diff Detail

Event Timeline

springerm created this revision.Apr 6 2023, 1:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 6 2023, 1:31 AM
springerm requested review of this revision.Apr 6 2023, 1:31 AM
rriddle accepted this revision.Apr 6 2023, 1:43 AM

Nice

This revision is now accepted and ready to land.Apr 6 2023, 1:43 AM