)]}'
{
  "commit": "038ca4a18df162b50efcf7947035517662a3a90d",
  "tree": "b62a87ca34be0695eade69687552a5a71eac1975",
  "parents": [
    "4b647a3eed94397299e0e62468af7fd4808eb1b6"
  ],
  "author": {
    "name": "Andrei Golubev",
    "email": "andrey.golubev@intel.com",
    "time": "Mon Sep 15 16:13:18 2025 +0100"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Sep 15 08:15:23 2025 -0700"
  },
  "message": "[mlir][TableGen] Emit interface traits after all interfaces (#147699)\n\nInterface traits may provide default implementation of methods. When\nthis happens, the implementation may rely on another interface that is\nnot yet defined meaning that one gets \"incomplete type\" error during C++\ncompilation. In pseudo-code, the problem is the following:\n```\nInterfaceA has methodB() { return InterfaceB(); }\nInterfaceB defined later\n\n// What\u0027s generated is:\nclass InterfaceA { ... }\nclass InterfaceATrait {\n  // error: InterfaceB is an incomplete type\n  InterfaceB methodB() { return InterfaceB(); }\n}\nclass InterfaceB { ... } // defined here\n```\n\nThe two more \"advanced\" cases are:\n* Cyclic dependency (A requires B and B requires A)\n* Type-traited usage of an incomplete type (e.g.\n`FailureOr\u003cInterfaceB\u003e`)\n\nIt seems reasonable to emit interface traits *after* all of the\ninterfaces have been defined to avoid the problem altogether.\n\nAs a drive by, make forward declarations of the interfaces early so that\nuser code does not need to forward declare.\n\nGitOrigin-RevId: f5d3cf4a643fc13194e09cb39905f7f3b083f85e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dea26b8dda62a0b10af4fcb61d88fe370cdb62d7",
      "old_mode": 33188,
      "old_path": "test/lib/Dialect/Test/TestInterfaces.td",
      "new_id": "d3d96ea5a65a4cb55c95db3796c659ff64ddac15",
      "new_mode": 33188,
      "new_path": "test/lib/Dialect/Test/TestInterfaces.td"
    },
    {
      "type": "modify",
      "old_id": "17bd631fe250d1609ad444dcdb7029f62f677b02",
      "old_mode": 33188,
      "old_path": "test/mlir-tblgen/op-interface.td",
      "new_id": "aa71baddf58cded69c0ca279c672dc7c15774399",
      "new_mode": 33188,
      "new_path": "test/mlir-tblgen/op-interface.td"
    },
    {
      "type": "modify",
      "old_id": "4dfa1908b3267e95ad0b2c3b42eb62353f6aa419",
      "old_mode": 33188,
      "old_path": "tools/mlir-tblgen/OpInterfacesGen.cpp",
      "new_id": "3cc1636ac33171e999cac753a28a3d50e5feeb4e",
      "new_mode": 33188,
      "new_path": "tools/mlir-tblgen/OpInterfacesGen.cpp"
    }
  ]
}
