[LLVMdev] [Fwd: Error while running my pass with opt]

ambika ambika at cse.iitb.ac.in
Sat May 8 11:03:25 PDT 2010


But this is already present in my pass.
And I am not able to understand the cause for the error:

opt: /home/ambika/llvm_3/llvm-2.6/include/llvm/PassAnalysisSupport.h:203: 
AnalysisType& llvm::Pass::getAnalysisID(const llvm::PassInfo*) const 
[with AnalysisType = llvm::DominatorTree]: Assertion `ResultPass && 
"getAnalysis*() called on an analysis that was not " "'required' by 
pass!"' failed.

What can possibly cause this. Any ideas will also help.

Tobias Grosser wrote:
> Hi,
>
> you need something like this in your pass:
>
> void YourPass::getAnalysisUsage(AnalysisUsage &AU) const {
>   AU.addRequired<DominatorTree>();
> }
>
> because you need to specify which analysis you are using.
>
> Tobi




More information about the llvm-dev mailing list