<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">It seems that you can write a custom TableGen backend (<a href="https://llvm.org/docs/TableGen/BackGuide.html" class="">https://llvm.org/docs/TableGen/BackGuide.html</a> ) to achieve your task. I don’t think LLVM/Clang accepts or has any plan using python script to generate header files from TG files.<div class=""><br class=""></div><div class="">Also, can you elaborate why existing TG backends, especially those used for generating builtins, can’t solve your problems? Is it possible to adapt your .td files to leverage existing TG backends?<br class=""><div><br class=""></div><div>-Min<br class=""><blockquote type="cite" class=""><div class="">On Jan 3, 2021, at 10:47 PM, Zakk via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi all,<div class=""><br class=""><div class="">In our downstream clang build process, we use python script to generate Builtins*.td, *.BuiltinCodegen.inc and C header. (it's similar to <a href="https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/blob/EPI/clang/include/clang/Basic/CMakeLists.txt#L97-110" class="">https://repo.hca.bsc.es/gitlab/rferrer/llvm-epi/-/blob/EPI/clang/include/clang/Basic/CMakeLists.txt#L97-110</a>)</div><div class=""><br class=""></div><div class="">It's a different way like ARM did (create a new option in clang-tblgen (C++ code) and generate corresponding files.)</div><div class=""><br class=""></div><div class="">We are planning to upstream this part and wondering if it's necessary to rewrite generator with C++ code.<br class=""></div><div class=""><br class=""></div><div class=""><div class="">-- <br class=""><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br class="">Kuan-Hsu<br class=""><br class=""><br class=""></div></div></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>