<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/125360>125360</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Passes.h requires extra dependency on MLIRMathToEmitC
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
RoboTux
</td>
</tr>
</table>
<pre>
Hi,
Including Passes.h with a dependency on MLIRPass fails with the following error:
mlir/include/mlir/Conversion/MathToEmitC/MathToEmitC.h:11,
mlir/include/mlir/Conversion/MathToEmitC/MathToEmitCPass.h:12,
mlir/include/mlir/Conversion/Passes.h:44,
[...]
mlir/include/mlir/Dialect/EmitC/IR/EmitC.h:28:10: fatal error: mlir/Dialect/EmitC/IR/EmitCEnums.h.inc: No such file or directory
A dependency on MLIRMathToEmitC solves the problem of course but requires the user of Passes.h to know that that conversion is included and that it needs an extra dependency for mlir-tablegen to generate the right file. Likewise adding the dependency on MLIRMathToEmitC in MLIRPass would mean special casing MathToEmitC since none of the other conversions need a dependency on their library. I'm not sure how to handle this correctly, perhaps the dependency of MathToEmitCPass.h on LanguageTarget can be avoided?
@recursion-man any thought?
Best regards,
Thomas
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJykVF1v4zYQ_DX0yyKCREnn-EEPTnJCA-SKIsgfWJErkT2KdPlhn_99QclxE7g4tLgXG9IuZ2dmR8QQ9GSJOtY-sPZpgykq57tXN7i39GMzOHnuftOMP7Jyz8r9sxUmSW0n-ANDoFAoOOmoAEHSgawkK87gLHx7eX7NHTCiNmHtiYpgdMa4Uz5P3jvP6v2KOxvtGe_1Ak-M95cXj84eyQftLOP9N4zqzX2ddXz8_FQoVu-ramX5a1CZ9ArH_wfcuxms3jfNxaz2oSgK1j79BONJoyERGe_fmTy_vj8sYPw-MylZvYcRI5qra_AfEL7aNIdCFdqKfOJ3ByEJBaM2BM6D1J5EdP68bmD_Lxv84AsEZ44UliUevBsMzeBGEC75QDCkCJ7-StpfWlIgn-vXlEQH3607QVQY1x9xNRB0gIs3EtDKta4jWCIZAC3Qj-g_RWx0frHgLuJgaCKbB0xkyWOkhYHXk4qL2AJe9Hc66UCAcslurv9crf4Q4ZNLRsJMaCEcSGg0IDBknE_-aCsIrLOUdecJLiryH2SGRc_NpxIVaQ9GDx79uYBnxrczWBchJE-gsmcOFFppsjAdQDifN2fOjD_CgbzCQ7iRNMJNqPOwF7RTwone0E8UQaCFgQCPTkuSrO7XLLCm9CTSwvpuRgtozxCVS5OK16YHCnnpE3oZ1si_KTdj2Miulrt6hxvqqm193zRtWbcb1TVfqKyHane_Ffe4Latdy0XDtzvRlqUcy3qjO17ytuRlxStet21R0yjbSkjeVvfNwLesKWlGbQpjjnPh_LTRISTqKt7WX8qNwYFMWG4yzi2dYKkyzvPF5rt86G5IU2BNaXSI4R-YqKOh7hrWa5RvcncblU3yplMxHkK-zHjPeD_pqNJQCDcz3ucZl7-7g3d_rl_rwiww3l-oHzv-dwAAAP__Q4rdvw">