The answer is yes.
- compile C ++ code with
clang++ instead of clang - remove the
-force-interpreter option - add option - jit-enable-eh
I slightly modified your test:
#include <stdio.h> void func(){ throw "test"; } int main(){ try{ func(); } catch(...){ printf("Gotcha\n"); } }
Result:
$ clang ++ -S -emit-llvm test.cpp
$ lli -jit-enable-eh test.ll
Caught
source share