<div dir="ltr">Hello,<div><br></div><div>I want an instance of CallGraph in my pass. By looking at -dot-callgraph source, I've tried something like this:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>CallGraphWrapperPass *CGWP = new CallGraphWrapperPass(); </div></div><div><div>PM.add(CGWP);</div></div><div><div>CallGraph *CG = &CGWP->getCallGraph();</div></div><div><div>PM.add(new MyPass(CG));</div></div></blockquote><div><br></div><div>I get the following error:</div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>/home/riyad/installs/llvm-3.7.0/include/llvm/PassSupport.h:95:38: error: no matching constructor for initialization of</div></div><div><div>      'MyPass'</div></div><div><div>Pass *callDefaultCtor() { return new PassName(); }</div></div></blockquote><div><br></div><div>My guess is pass manager needs pass with default constructor. Is there any easy way to get instance of call graph in my pass?</div><div><br></div><div>Thanks in Advance,</div><div>Riyad</div></div>