[LLVMdev] LLVMdev Digest, Vol 86, Issue 5
Peter Lawrence
peterl95124 at sbcglobal.net
Thu Aug 4 14:03:05 PDT 2011
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 ?)
-Peter Lawrence.
On Aug 3, 2011, at 12:35 AM, llvmdev-request at cs.uiuc.edu wrote:
>> yes there is something about the order :) When front-ends output
>> code, all
>> catches come before filters, but after inlining you can get:
>> catches, filters,
>> catches, filters etc and this ordering needs to be preserved.
>> Also, filters
>> are different from catches: filter ty_1, ty_2, ..., ty_N matches
>> any exception
>> that would not be caught by any of ty_1, ty_2, ..., ty_N. This is
>> quite
>> different to filter ty_1, filter ty_2, ..., filter ty_N. For
>> example, suppose
>> you throw ty_2. Then the filter ty_1, ty_2, ..., ty_N wouldn't
>> match that,
>> but filter ty_1 would.
>>
>> So filter ty_1, ..., ty_N makes sense; but I don't think catch
>> ty_1, ..., ty_N
>> makes sense.
>
> Agreed. Other notes: a zero-type filter is meaningful (and pretty
> common ? it's the result of 'throw()'), but the ordering of the
> cleanup
> bit is not, so I would suggest this grammar:
>
> Instruction ::= 'landingpad' Type 'personality' TypeAndValue
> 'cleanup'? LandingPadClause*
> LandingPadClause ::= 'catch' TypeAndValue
> LandingPadClause ::= 'filter' TypeAndValue*
>
> John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110804/d7b3b31d/attachment.html>
More information about the llvm-dev
mailing list