[PATCH] Fix __builtin_setjmp in combination with sjlj exception handling.

Matthias Braun matze at braunis.de
Wed May 20 14:54:10 PDT 2015


> Isn't llvm.eh.sjlj.setjmp specifically the intrinsic for sjlj exception-handling setjmp? In which case emitting the dispatch table > when it's seen sounds reasonable. Intrinsics.td lists it under "Exception Handling Intrinsics".




> Clang does generate llvm.eh.sjlj.setjmp for __builtin_setjmp, but that sounds more like a bug in clang to me.


I just had a chat with Joerg on IRC as he objected my plan to simply rename sjlj.setjmp to something else. Apparently sjlj.setjmp/sjlj.longjmp are the right thing to use to implement __builtin_setjmp and __builtin_longjmp and in fact if you look at the SjLj runtime in libcxxabi you will find __builtin_longjmp being used to implement exactly this scheme.

So in short: I think it is expected and fine to use llvm.eh.sjlj.setjmp/llvm.ej.sjlj.longjmp to implement the builtins in clang. So I think the proposed change to split dispatch table setup into an own intrinsic is indeed reasonable.


REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9313

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list