[LLVMdev] Strange Multiple Inheritance Errors Using LLVM 2.7
John Criswell
criswell at uiuc.edu
Thu Mar 25 08:18:58 PDT 2010
Dear All,
I'm currently upgrading SAFECode to the LLVM 2.7 API. I'm getting some
strange errors in LLVM Passes that use analysis groups and multiple
inheritance.
To create analysis groups in LLVM 2.6, I would first create a base class
for the analysis group and then another class that inherited from both
ModulePass and the analysis group base class. That worked in LLVM 2.6,
but now in LLVM 2.7 I'm getting strange behavior. In particular, I'm
seeing the wrong functions called when virtual methods of my passes are
called. For example, when a SAFECode pass would call the getDSGraph()
method of the PoolAllocateSimple pass, the releaseMemory() method would
be called instead.
Has anyone else seen this really bizarre behavior or know what might be
causing it? Eliminating multiple inheritance seems to fix the problem,
but it seems to introduce other problems when chaining analysis passes
of the same group together.
I see this behavior both on Mac OS X and Linux.
-- John T.
More information about the llvm-dev
mailing list