<div dir="rtl"><div dir="ltr">Hello,</div><div dir="ltr"><br></div><div dir="ltr">I'm trying to make exceptions work using MCJIT on Windows 7 x64 (the compiled code is 32bit).</div><div dir="ltr">The command line driver and the MCJIT program are compiled from the same LLVM codebase, latest revision from yesterday.<br>
</div><div dir="ltr"><div dir="ltr">Visual C++ 2012 was used to build the LLVM project while MingW 4.8.1 was used to build libcxx and libcxxabi.</div></div><div dir="ltr">The same headers and same above DLLs are used for both command line and for MCJIT.</div>
<div dir="ltr">Invocation parameters shown by -v are identical except that MCJIT needs ELF object format while the command driver needs COFF.</div><div dir="ltr">The code below catches exceptions when compiled from the command line but from MCJIT the compiled code just calls terminate.<br>
</div><div dir="ltr"><br></div><div dir="ltr">Any ideas how to catch exceptions with MCJIT generated code?</div><div dir="ltr"><br></div><div dir="ltr">Thanks, Yaron</div><div dir="ltr"><br></div><div dir="ltr"><div dir="ltr">
<font face="courier new, monospace">#include <iostream></font></div><div dir="ltr"><font face="courier new, monospace">int main() {</font></div><div dir="ltr"><font face="courier new, monospace"> try {</font></div>
<div dir="ltr"><font face="courier new, monospace"> throw 1;</font></div><div dir="ltr"><font face="courier new, monospace"> }</font></div><div dir="ltr"><font face="courier new, monospace"> catch (...) {</font></div>
<div dir="ltr"><font face="courier new, monospace"> std::cout<<"Caught!\n";</font></div><div dir="ltr"><font face="courier new, monospace"> }</font></div><div dir="ltr"><font face="courier new, monospace"> return 0;</font></div>
<div dir="ltr"><font face="courier new, monospace">}</font></div><div><br></div></div><div dir="ltr"><br></div></div>