<div dir="ltr"><div><div><div><div>Dear LLVMers,<br><br></div>I am implementing a Function Pass and I would like to use analysis obtained from a Module Pass. Some extracts of my code look like that:<br><br> struct MyPass : public FunctionPass {<br>
static char ID;<br> MyPass() : FunctionPass(ID) {<br> PADriver &PD = getAnalysis<AModulePass>();<br><br>...<br> virtual void getAnalysisUsage(AnalysisUsage &AU) const{<br> AU.setPreservesAll();<br>
AU.addRequired<AModulePass>();<br> }<br><br></div>But when I try to run my pass, I get the following error at the point os getAnalysis:<br><br> Assertion `Resolver && "Pass has not been inserted into a PassManager object!"' failed.<br>
<br><br></div>Did I do anything I should not or did I miss something?<br><br></div>Regards,<br clear="all"><div><div><div><div><div><br>-- <br>Izabela Maffra.<br><br><i>Ciência da Computação<span></span><br>Universidade Federal de Minas Gerais<br>
(31) 8615-3077</i><br><br>“Don't count the days, make the days count.”
― Muhammad Ali<br>
</div></div></div></div></div></div>