Dear everyone,
I want to traverse call graph, but I have some trouble .
In my pass MyPass which need to traverse call graph, I firstly added the CallGraph analysis to the pass requirements by
AU.addRequired();
My pass MyPass then will be added to a pass manager by
manager.add(new MyPass());
and then I want to traverse the call graph such as:
CallGraph CG = this->getAnalysis;
for (CallGraph::const_iterator i = CG.begin(); i != CG.end(); ++i) {
…
}
However, I encountered a segmentation fault with the next core dump information. What should I do?
llvm::PassInfo::createPass() const + 4
llvm::PMTopLevelManager::schedulePass(llvm::Pass*)
llvm::PassManager::add(llvm::Pass*)
…