Assertion when loading bitcode

Hello Everyone,

I can cross-compile LLVM-2.5 to ARM and run lli on a simulator in debug mode . However, when I now compile with optimization enabled, lli triggers an assertion when loading bitcode files. The assertion looks like this :

lli: /home/Virement/llvm/llvm-2.5-linux/include/llvm/Support/Casting.h:199: typename llvm::cast_retty<To, From>::ret_type llvm::cast(const Y&) [with X = llvm::FunctionType, Y = const llvm::Type*]: Assertion `isa(Val) && “cast() argument of incompatible type!”’ failed.

I think it happens because R->ParseBitcode() (lib/Bitcode/Reader/Bitcode.cpp 02080) fails which causes line 02086 to be executed???

Has anyone come across this problem before?

Thanks

Hi,

I can cross-compile LLVM-2.5 to ARM and run lli on a simulator in debug
mode . However, when I now compile with optimization enabled, lli
triggers an assertion when loading bitcode files. The assertion looks
like this :

are you not able to use a more recent version of LLVM like LLVM-2.7?

Ciao,

Duncan.