[llvm-commits] [llvm] r97757 - /llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp

Duncan Sands baldrick at free.fr
Fri Mar 5 01:17:26 PST 2010


Hi Jim,

> For SJLJ exception handling, make sure that all calls that are not marked
> as nounwind are marked with a -1 call-site value. This is necessary to, for
> example, correctly process exceptions thrown from within an "unexpected"
> execption handler (see SingleSource/Regression/C++/EH/expection_spec_test.cpp).

a similar issue occurs with dwarf exception handling (there every call that is
allowed to unwind must be part of a call-site entry with a null landing pad -
calls with no call-site that unwind are considered to be an error by the C++
personality, which terminates the program).  The code generator tiles the entire
function with call-sites: real call-sites for invokes, and between them a site
with a region that stretches from the end of one invoke to the start of the next
and with a null landing pad.  (As an optimization it doesn't bother generating
such a region if there is nothing that can throw inside it).  Does SjLj use the
dwarf writer?  If so, maybe it can squeeze what it needs out of the existing
logic somehow.

Ciao,

Duncan.



More information about the llvm-commits mailing list