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

    <tr>
        <th>Summary</th>
        <td>
             [TableGen] Fix llvm-tblgen library structure
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            Pierre-vh
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Pierre-vh
      </td>
    </tr>
</table>

<pre>
    llvm/utils/TableGen has a weird library structure, and it's not the first time a seemingly innocent change triggers linker errors in some build bots. I'm often unable to reproduce such errors locally, so I wonder if they only happen in some configurations, or when using gcc?

In any case, that library is due for a clean-up I believe. Helpers are mixed with backends, some files are ad-hoc placed into other targets because they have unit tests, etc. It may be a good idea to simply have two folders: one for the backends, and one for all helpers associated with the backends.

I had to revert https://github.com/llvm/llvm-project/commit/cfa0833ccc7450a322e709583e894e4c96ce682e because of these issues. This should re-land when fixed.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU03SozYQPY286TKFBbbxgsVMppx4l8VcoJEa1BkhudSNPb59Cvvzl0lllQ1QwFO_n34owlMi6s3-q7H2T6ZSaHsLxlqz_7bBRUMu_efrzZD9o4_xNht7XpSjGHv-jkOk3ylBQAGEO3HxEHkoWB4gWhanSyFjfwNMHliNPQqkrKCBYOQiCsozAYIQzZym-ABOKTtKCi5gmgi08DRREYicflABKiUXAU4geSYYFo4ehqxSwcXY4wx5VEqwpJUbaIZC15L94ghkceGNj9lhjI-Vm2S4wD0nTwV4XLk9IKf4gIDXK6XPUS6nkaeloHJOsiJzgXtYhwmnCSbnTHM29TdTf3ldLwkwPcChPE3QgPppDwv4hWDMBRBcJEzb5QoXGCgy3aiCPyheV91YCGb-SR7urAEGdD8oeXkxn1cfI73-Qr8N2cE1oiMPnDRD1kAFFMtEKjCQw0XoJTHgjWBJrKAk-jyP1FVwUZjxAcMay5SzB_aEq5HC8zV-4PSeYczRUxHTfIGcXkrWXH8luMb-_oYxQnhrEsmOUd-ifsVV_3IQAvpXijcqCkH1uk409mzseWINy1C5vC7lx26ut-215L_IqbFnl-eZnw8j1l3TOOeO7b7Gxlo61qd911B3aql1p4OjQ2fp06T8XAUhYJGFpILvgQUk5CV6KLSNq7hn_OOaTrXxfeNPzQk31O-O9XFnm67dbUI_-A7JN270R2q7w77xOLpm3LnDvt7Vjd9wb2vb1rbe16e6rXfV7tidDs3J-UN3ogOhaWuakWO1iqtymTZPTn1XH9rjJuJAUT56nOj-IvzR4_Ls7HZYJjFtHVlU_jlFWSP1YPZf3002-29w5p_wBOkQJ0r_LfRmKbH_30m8bDT2_GT9dwAAAP__G8OGhw">