<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.19019">
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2 face=Arial>Hi all,</FONT></DIV>
<DIV><FONT size=2 face=Arial>I tried to have a LoopInfo object in a function 
pass, add addRequired<LoopInfo> in getAnalysisUsage, and then use 
getAnalysis<LoopInfo> in runOnFunction(). It worked OK.</FONT></DIV>
<DIV><FONT size=2 face=Arial>Now I want to have a module pass to traverse the 
functions, and similarly I want to have to loop information of the functions. 
When I did the above in runOnModule, and run the pass, the following error 
popped out:</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial><EM>AnalysisType& llvm::Pass::getAnalysis() 
const [with AnalysisType = llvm::DominatorTree]: Assertion `Resolver && 
"Pass has not been inserted into a PassManager object!"' 
failed.</EM></FONT></DIV>
<DIV><EM><FONT size=2 face=Arial></FONT></EM> </DIV>
<DIV><FONT size=2 face=Arial>Can anyone tell me the correct way to handle this 
in a module pass? Thanks a lot!</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Best,</FONT></DIV>
<DIV><FONT size=2 face=Arial>--Wenbin</FONT></DIV></BODY></HTML>