<font color='black' size='2' face='arial'>
<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">

<div id="AOLMsgPart_2_d088532f-f167-441b-8c60-b7fd1469fec2">

<font face="arial" size="2" color="black">

<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">


<div id="AOLMsgPart_2_0b0b258d-4f86-4856-b5f1-95a0d08a27a8">

<font face="arial" size="2" color="black"><font size="2"><font face="Arial, Helvetica, sans-serif">Hello Everyone,<br>


<br>


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 :<br>


<br>


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<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.<br>


<br>


<br>


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


<br>


Has anyone come across this problem before?<br>


<br>


<br>


Thanks<br>


<br>


<br>


<br>


<br>


</font></font>


<div style="clear: both;"></div>


</font>

</div>

 <!-- end of AOLMsgPart_2_0b0b258d-4f86-4856-b5f1-95a0d08a27a8 -->
</div>

</font>

</div>
 <!-- end of AOLMsgPart_2_d088532f-f167-441b-8c60-b7fd1469fec2 -->
</div>
</font>