When I try running simple example with exceptions through JIT I get this output: terminate called after throwing an instance of 'E*' Why exceptions don't work in JIT and what it takes to make them work? Yuri --- e.C --- #include <stdio.h> #include <stdlib.h> class E { }; void xmain() { try { throw new E; } catch (E *e) { printf("caught!\n"); } printf("done\n"); } --- commands --- clang++ -O3 -fexceptions -emit-llvm -S -o e.ll e.C llvm-as e.ll lli --entry-function=_Z5xmainv e.bc
-jit-enable-eh solves the problem. Sorry, Yuri On 07/13/2010 22:09, Yuri wrote:> When I try running simple example with exceptions through JIT I get this > output: > terminate called after throwing an instance of 'E*' > > Why exceptions don't work in JIT and what it takes to make them work? > > Yuri > >
On Tue, Jul 13, 2010 at 10:09 PM, Yuri <yuri at rawbw.com> wrote:> When I try running simple example with exceptions through JIT I get this > output: > terminate called after throwing an instance of 'E*' > > Why exceptions don't work in JIT and what it takes to make them work?Try "lli -jit-enable-eh e.bc". -Eli
Seemingly Similar Threads
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?
- [LLVMdev] Why -jit-emit-debug doesn't work with gdb-7.1 ?
- [LLVMdev] Strange exception code behavior: insertion of trace instructions makes result incorrect