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

Jim Grosbach grosbach at apple.com
Mon Aug 24 11:47:19 PDT 2009


On Aug 24, 2009, at 12:27 AM, Duncan Sands wrote:

> Hi Jim,
>
>> +  // If we don't have any eh.selector calls, we can't determine  
>> the personality
>> +  // function. Without a personality function, we can't process  
>> exceptions.
>> +  if (!PersonalityFn) return false;
>
> can you use the C (yes, C!) personality function?  It is always
> available since it's part of libgcc.
>

Hi Duncan,

If I pick an arbitrary personality function, there's no guarantee  
things will be compatible with how the context and LSDA are expected  
to be used.  Realistically, when we get input code like this (still  
have invokes and landing pads, but no eh.selectors), I'm not sure it's  
valid code at all. It's definitely outside the scope of what the SjLj  
exception handling is designed to handle. Thus, I think the  
conservative answer is to punt rather than guess.

-Jim



More information about the llvm-commits mailing list