Jon Chesterfield via llvm-dev
2018-Nov-05 22:51 UTC
[llvm-dev] Confused by how to register a pass with opt
> > You need to call "initializeMyExamplePass" ahead of time. Look at > include/llvm/InitializePasses.h, and for the actual calls that > initialize individual passes, at lib/Analysis/Analysis.cpp, > lib/Transforms/Scalar/Scalar.cpp, etc. > > These are all called from "main" in opt.cpp. > > -Krzysztof >Ah, right. Given the hint that I actually do need to arrange to call initialize myself, I've put the call to initializeMyExamplePass in LLVMInitializeMyTarget. That works fine and, now that I've looked more carefully, seems to be how other targets have done it. Thanks! Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181105/08c1c93e/attachment.html>