<div dir="ltr">Hi all,<div>I have a function pass which does some analysis and populates</div><div><br></div><div>A a;</div><div><br></div><div>where</div><div><br></div><div>typedef std::map< std::string, B* > A;<br></div><div><br></div><div>class B {</div><div>typedef std::vector< C* > D;</div><div>D d;</div><div>}</div><div><br></div><div>class C {</div><div>// some class packing information about basic blocks;</div><div>}</div><div><br></div><div>Hence I have a map of vectors traversed by string.</div><div>I wrote associated destructors for these classes. This pass works successfully on its own.</div><div><br></div><div>I have another function pass needing this structure of type A to make some transformations. I used </div><div><br></div><div><div> bool secondPass::doInitialization(Module &M) {</div><div>   errs() << "now running secondPass\n";</div><div>   a = getAnalysis<firstPass>().getA();</div><div>   </div><div>      return false;</div><div>    }</div></div><div><br></div><div><div>void secondPass::getAnalysisUsage(AnalysisUsage &AU) const {</div><div>    AU.addRequired<firstPass>();</div><div>    AU.setPreservesAll();</div><div>  }</div></div><div><br></div><div>the whole code compiles fine. But I get  seg. fault when printing this structure at the end of my first pass <b>if I call my second pass since B* is null.</b></div><div><b><br></b></div><div>How should I wrap this data structure and pass it to the second pass without issues?</div><div><br></div><div>Thanks in advance.</div><div><br></div><div><br></div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail-m_1429865893354771550gmail-m_4071220846525367220m_-4042106761263112623m_-1295060548708917408gmail_signature"><div dir="ltr">Buse</div></div></div></div>