[LLVMdev] "Cannot call createPass on PassInfo without default ctor!"

Edmund Grimley-Evans Edmund.Grimley-Evans at arm.com
Fri Jul 23 07:02:24 PDT 2010


While trying to add a pass to the ARM back end I'm getting quite a lot of this assertion failure:

Pass.cpp:255: llvm::Pass* llvm::PassInfo::createPass() const: Assertion `NormalCtor && "Cannot call createPass on PassInfo without default ctor!"' failed.

A simple way to get it is to add two lines to ARMTargetMachine.cpp:

#include "llvm/Transforms/Scalar.h"

and

  PM.add(createSinkingPass());

in addInstSelector just before this line:

  PM.add(createARMISelDag(*this, OptLevel));

Then run anything through the ARM back end, for example:

clang -cc1 -triple thumbv7-eabi -O3 -target-cpu cortex-a8 x.c -S -o x.s

The interesting thing is that the assertion failure doesn't happen during the call to createSinkingPass(), which I added, but during the call to createARMISelDag in the following line.

Can anyone tell me what's going on here?

(I've also tried adding the Hello pass, with the same result.)

Thanks,

Edmund
-- 
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium.  Thank you.




More information about the llvm-dev mailing list