[cfe-commits] r167534 - in /cfe/trunk: lib/CodeGen/CGException.cpp lib/CodeGen/CGObjCGNU.cpp lib/CodeGen/CodeGenFunction.h test/CodeGenObjC/gnu-exceptions.m

David Chisnall csdavec at swan.ac.uk
Mon Nov 12 18:53:46 PST 2012


On 11 Nov 2012, at 00:41, John McCall wrote:

> If you're going to do this, you need to have two different EH-resume blocks.
> The way it's written right now, whichever you ask for first is going to be what
> you get, even for later requests with a different parameter.
> 
> But really, I don't understand why you need this parameter at all.  The only
> place you're passing false is when asking for the block to branch to
> when an exception-specification fails to trigger.  This is actually still the
> "falling off the end of the EH scope" case, and should still be emitted with
> a resume instruction.  I don't think there's any 'resume' case where you
> actually want to call the rethrow function.

In that case, I'm confused.  The case that I have failing is that resuming an exception caught by an Objective-C catch (including a catchall) should use the throw function, but resuming one caught in an @finally directive or via a cleanup attribute.  Do you have any suggestions for fixing this correctly?  It was working correctly in clang 3.0, but was broken during the EH refactoring at some subsequent point.

David



More information about the cfe-commits mailing list