[llvm-dev] How to debug passes

Lorenzo Casalino via llvm-dev llvm-dev at lists.llvm.org
Wed Sep 18 14:32:04 PDT 2019


> opt -load lib­dum­my­pass.so -dum­my­pass hel­lo.ll

Looks like you are loading a shared library different from "LLVMHello.so".

did you change the name of the compilation unit from "Hello.cpp" into
"dummypass.cpp"?


(As asked previously by Andrzej) did you register the dummy pass?

> RegisterPass<DummyPass> X("dummypass", "whatever");


Is any error/warning triggered when loading the library, executing "opt" or
during compilation?


Could you attach the fragment containing the "DummyPass"?


Lorenzo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190918/1d8261ca/attachment.html>


More information about the llvm-dev mailing list