Hi Anton,<br><br>> > I would expect llvm-gcc to use LLVM's setjmp/longjmp intrinsics and<br>> > then to run the LowerSetJmp pass to turn the intrinsic calls into uses<br>> > of invoke and unwind. At that point, the control flow is explicit,
<br>> > isn't it?<br>> Unfortunately, no. You can call setjmp/longjmp on the same jump buffer<br>> multiple times. So, in general it's not possible to determine, where<br>> jump destination is. The problem is much worse in case, when jump buffer
<br>> escapes from the function, where it was initialized (like in your case -<br>> longjmp is called in the g() routine).<br><br>LowerSetJmp should handle this by turning the call to g() into an invoke. If g() calls longjmp(), it will do an unwind.
<br><br>Are you saying that the LowerSetJmp pass doesn't work? Or that the whole idea of lowering setjmp/longjmp to invoke/unwind doesn't work?<br><br>Thanks,<br>Jay.