[LLVMdev] llvm pass INITIALIZE
Alexandru Ionut Diaconescu
alexandruionutdiaconescu at gmail.com
Thu Jan 24 04:00:40 PST 2013
Till now I have succesfully running passes using RegisterPass template. I
have encountered a segfault in my pass.
Assertion `AA && "AA didn't call InitializeAliasAnalysis in its run
Then, I tried to use INITIALIZE_PASS_XXXX or INITIALIZE_AG_PASS template,
together with `*llvm::createMyMemDepPrinter()` and
Therefore, I got two compilation errors:
MyMemDepPrinter.cpp:101:1: error: ‘void
llvm::initializeMyMemDepPrinterPass(llvm::PassRegistry&)’ should have been
declared inside ‘llvm’
MyMemDepPrinter.cpp:104:43: error: ‘llvm::FunctionPass*
llvm::createMyMemDepPrinter()’ should have been declared inside ‘llvm’
So I added `(void) llvm::createMyMemDepPrinter();`to LinkAllPasses.h.
`initializeMyMemDepPrinterPass` I don't know yet where to add (maybe in a
However, I don't know how to compile only those modified files and not the
entire LLVM. I don't think that is such a good idea to compile "by hand"
Can you tell me if this is the way I can solve the segfault and how do I do
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev