<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’s a lot easier to load custom pass plugins into clang with the new PassManager actually:<div class="">```</div><div class="">clang -fpass-plugin=<path to plugin> ...</div><div class="">```</div><div class="">Note that <path to plugin> needs to be an absolute path.</div><div class=""><br class=""></div><div class="">-Min<br class=""><div class=""><div class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Dec 17, 2021, at 6:38 AM, Alberto Barbaro 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="auto" class="">Hi all,<div dir="auto" class="">Few days ago I have discovered the symcc[1] project. This project, via an llvm pass, is able to modify the IR code and to inject calls to a backend which allows symbolic execution. I can use it with clang/llvm 11 but not with the version 13. </div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">I was wondering if maybe the new pass manager uses llvm passes in a different way .. so I have created a small pass which injects a call to printf in each function and I'm able to use it via opt. Now my question is: is it possible to run the same pass via clang and just obtain the modified IR code? I'd like to avoid to use opt if not mandatory. Is it possible to do it or the new pass manager forces me to use opt?</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">How would you fix this situation in symcc?</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">If someone could tell me how to load a ModulePass in clang-13 would be great.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Thanks a lot</div><div dir="auto" class="">Alberto</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">[1] <a href="https://github.com/eurecom-s3/symcc" target="_blank" rel="noreferrer" class="">https://github.com/eurecom-s3/symcc</a><br class=""><div dir="auto" class=""><br class=""></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></div></div></body></html>