[LLVMdev] getAnalysis()
Scott Mikula
mikula at uiuc.edu
Sun Nov 3 14:48:00 PST 2002
I'm having trouble with using getAnalysis() to access the results of one
pass from within another. I require the pass to be previously executed
as follows:
void MyPass::getAnalysisUsage(AnalysisUsage &Info) const {
Info.addRequired<TDDataStructures>();
}
Then I try to use it as follows:
bool MyPass::doInitialization(Module &M) {
TDDataStructures &dsgraph = getAnalysis<TDDataStructures>();
return false;
}
When I run my pass via opt, I get the following assertion error:
Assertion failed: i != AnalysisImpls.size() && "getAnalysis*() called on
an analysis that we not " "'required' by pass!", file
../../include/llvm/Pass.h, line 170
Any idea what I am doing wrong? Thanks,
Scott Mikula
More information about the llvm-dev
mailing list