<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/58562>58562</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [MLIR-Tablegen] cannot find the generated definition file
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          aoyulong
      </td>
    </tr>
</table>

<pre>
    I'm learning the [Chapter #2](https://mlir.llvm.org/docs/Tutorials/Toy/Ch-2/) of Toy tutorial. Form the file `mlir/examples/toy/Ch2/mlir/Dialect.cpp`, there is a statement `#include "toy/Dialect.cpp.inc"`.  I know the included`toy/Dialect.cpp.inc` is automatically generated by Tablegen and the corresponding CMake command is `mlir_tablegen(Dialect.cpp.inc -gen-dialect-defs)`. Howere, I **cannot find the generated file `toy/Dialect.cpp.inc`** anywhere. I follow the [instructions](https://mlir.llvm.org/getting_started/) to install mlir. Since I can sucessfully run `toyc-ch2 test/Examples/Toy/Ch2/codegen.toy -emit=mlir -mlir-print-debuginfo`, the installation should be OK. So can anyone show me where or how to find the generated `toy/Dialect.cpp.inc`?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU11v2zAM_DX2C2HDkT8WP_ihS1cs2IoBW98LWWZsrbIUSPKy_PtRqrN0QzsMCOyIFI_H47k3w7nbJ-zdDAq51VKP4CeEpH6_m_jRo4WElSypbxO2nbw_uqS8Sdgd_WYlba7Ujzk3dqTzYISj18PijZVcxf_mTM_dlLFY0oI5AMXAr3dyuDN2jg0PUlHXpgiodBl_8vmoMID4FYStPel1S7UofC6ORypJ2C5AWATpgIPz3OOM2kPMlVILtQwEztgz1IvqnJIUp4s5wB6etDlFNmvNQInXa5oiNqM5Zu6l4EqdYUSNlnoP0J_hgfcKKQJcDxFSGGvRHY0egsa7e_4UYvMc8gS1jv7o1zqS-6-ekFE4G56D2YAHEqeNzD-aE00fZNjTlLSeG8G1Np5EXZtfqV10fmus53pifT4FSXOCPBilVl3IFlI7bxfhpdHuf2wxovc08SOtxRKB1QjeQAAi3SAWwDdqj9SMmINbBDp3WIKodtErXZGJiYFH5wnjw9UfDy_8IcwQxMvpOmQ4S5-UtwEfsvDMjlbqIF2_jFIfzNU7FzI8jAVuMouiLSJ8-UTMTCRFihiNIXeCGSGqA8ZCONM0r0j9L5XLuxS7TdM0dVWU5TYdunJoy5anXnqFHel8_3n_Nbu4iISGt3dKXpBaRuphveliVffnUkbpp6XPyW90CMtZX6SI-U7U6CidW6Ke9bZuWDp1rDj0on0n6raomrYuSlbWKKpKlLxivOep4j0qF7gSvVRSAWObgpWbumabbb5lTdUOFdZ8YMhZlVQFzlyq3-ZIbRc50DYcJZV03l2T3Dk5asQLPn1rk7EdN-dFGT2mkW8Xyf4COquTNQ">