[LLVMdev] LLVMdev Digest, Vol 86, Issue 5
Bill Wendling
wendling at apple.com
Thu Aug 4 14:38:20 PDT 2011
On Aug 4, 2011, at 2:03 PM, Peter Lawrence wrote:
> Bill et al,
> I haven't really thought this through (I've never been a fan of exception specifications),
> but it seems that inlining functions that do have exception specifications, and hence filter
> operands in their landing-pads, isn't so obvious...
>
> if you want to inline
>
> void foo () throw() { ... } // empty throw() list means "no-throw"
>
> into a function that does allow exceptions to be propagated out, then you'll have a hard time
> combining their landing pads !
>
> it seems, at least on first thought, that having more than one filter list in a landing pad isn't
> useful ? (assuming the only way to get more than one is from inlining ?)
>
The exception tables are set up to allow for multiple exception specifications per function. So if we inline a function with exception spec of A, B, C into one with an exception spec of D, E then it's totally doable. The table will look something like this:
A
B
C
0
D
E
0
And the "action" part of the table will point to the correct exception spec start (A or D) depending on what state the exception is at a given time. (I.e., is it in a "resume" situation or "catch" situation.)
-bw
More information about the llvm-dev
mailing list