<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=""><div class="">Hi,</div><div class=""><br class=""></div>I wrote a small tutorial about this very topic: <a href="https://medium.com/@mshockwave/writing-llvm-pass-in-2018-part-iv-d69dac57171d" class="">https://medium.com/@mshockwave/writing-llvm-pass-in-2018-part-iv-d69dac57171d</a> <div class="">Details might differ from ToT codebase but I think the workflow hasn’t changed since then.</div><div class="">Hope this helps.</div><div class=""><br class=""></div><div class="">-Min</div><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Oct 7, 2021, at 7:44 AM, Jose Luis Vázquez via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Good afternoon<br class=""><br class="">I've developed a pass that I want to run directly from a clang invocation by setting an option in the command line. The pass has been ran through opt and tested for correctness. I've defined the option and the driver can parse it but I haven't been able to trigger the execution of the pass by the pass manager. Is there any particular structure I need to follow to convert the flag I added in include/clang/Driver/Options.td into an option parsed by the frontend?<br class=""><br class="">Kindest regards<br class=""><br class="">Jose Luis<br class=""><br class="">_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></div></blockquote></div><br class=""></div></body></html>