On Jul 30, 2013, at 12:24 PM, Eli Friedman <[email protected]> wrote:
> John probably remembers the details here more clearly, but it looks
> correct to me.

No, the protocol between the driver and the frontend needs to change here.

-fobjc-exceptions and -fcxx-exceptions will be the default if those languages
are enabled, so the frontend should stop looking for -fcxx-exceptions and
-fobjc-exceptions and should start looking for -fno-cxx-exceptions and
-fno-objc-exceptions.

-fexceptions is complicated because the driver logic is dependent on the
ObjC runtime.  I would say that ObjC should enable -fexceptions by default
if the runtime hasUnwindExceptions(); it doesn’t need to repeat the
Darwin/x86-64 from the driver.

So, basically, the frontend logic should be something like this:
 CXXExceptions = (CPlusPlus && !hasArg(“-fno-cxx-exceptions”));
 ObjCExceptions = (ObjC1 && !hasArg(“-fno-objc-exceptions”));
 Exceptions = (CXXExceptions || (ObjCExceptions && 
ObjCRuntime.hasUnwindExceptions()) || hasArg(“-fexceptions”)) && 
!hasArg(“-fno-exceptions”);

And then the driver basically makes the same decision that it does today,
and if that differs from what it knows the frontend will decide, it should
pass the appropriate option.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to