[cfe-commits] [libcxx] r160038 - /libcxx/trunk/src/exception.cpp

Richard Smith richard at metafoo.co.uk
Wed Jul 11 10:15:37 PDT 2012


On 11 Jul 2012 08:18, "Howard Hinnant" <hhinnant at apple.com> wrote:
>
> On Jul 11, 2012, at 6:17 AM, Joerg Sonnenberger <joerg at britannica.bec.de>
wrote:
>
> > On Wed, Jul 11, 2012 at 09:35:48AM -0000, Richard Smith wrote:
> >> @@ -96,12 +102,9 @@
> >> #ifndef LIBCXXRT
> >> bool uncaught_exception() _NOEXCEPT
> >> {
> >> -#if __APPLE__
> >> +#if __APPLE__ || defined(_LIBCPPABI_VERSION)
> >>     // on Darwin, there is a helper function so __cxa_get_globals is
private
> >>     return __cxa_uncaught_exception();
> >> -#elif LIBCXXRT
> >> -    __cxa_eh_globals * globals = __cxa_get_globals();
> >> -    return (globals->uncaughtExceptions != 0);
> >> #else  // __APPLE__
> >>     #warning uncaught_exception not yet implemented
> >>     ::abort();
> >
> > This looks wrong.
> >
> > Joerg
>
> I'm also concerned.  Where did the LIBCXXRT implementation go?
>
> #elif LIBCXXRT
>     __cxa_eh_globals * globals = __cxa_get_globals();
>     return (globals->uncaughtExceptions != 0);

Note the #ifndef LIBCXXRT at the top of this hunk. This was dead code.
On 11 Jul 2012 08:18, "Howard Hinnant" <hhinnant at apple.com> wrote:

> On Jul 11, 2012, at 6:17 AM, Joerg Sonnenberger <joerg at britannica.bec.de>
> wrote:
>
> > On Wed, Jul 11, 2012 at 09:35:48AM -0000, Richard Smith wrote:
> >> @@ -96,12 +102,9 @@
> >> #ifndef LIBCXXRT
> >> bool uncaught_exception() _NOEXCEPT
> >> {
> >> -#if __APPLE__
> >> +#if __APPLE__ || defined(_LIBCPPABI_VERSION)
> >>     // on Darwin, there is a helper function so __cxa_get_globals is
> private
> >>     return __cxa_uncaught_exception();
> >> -#elif LIBCXXRT
> >> -    __cxa_eh_globals * globals = __cxa_get_globals();
> >> -    return (globals->uncaughtExceptions != 0);
> >> #else  // __APPLE__
> >>     #warning uncaught_exception not yet implemented
> >>     ::abort();
> >
> > This looks wrong.
> >
> > Joerg
>
> I'm also concerned.  Where did the LIBCXXRT implementation go?
>
> #elif LIBCXXRT
>     __cxa_eh_globals * globals = __cxa_get_globals();
>     return (globals->uncaughtExceptions != 0);
>
> Howard
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120711/b65cca6d/attachment.html>


More information about the cfe-commits mailing list