[libcxx] r178237 - Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
Matthieu Monrocq
matthieu.monrocq at gmail.com
Thu Mar 28 11:42:49 PDT 2013
On Thu, Mar 28, 2013 at 4:00 PM, Howard Hinnant <hhinnant at apple.com> wrote:
> Author: hhinnant
> Date: Thu Mar 28 10:00:04 2013
> New Revision: 178237
>
> URL: http://llvm.org/viewvc/llvm-project?rev=178237&view=rev
> Log:
> Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
>
> Modified:
> libcxx/trunk/include/thread
>
> Modified: libcxx/trunk/include/thread
> URL:
> http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/thread?rev=178237&r1=178236&r2=178237&view=diff
>
> ==============================================================================
> --- libcxx/trunk/include/thread (original)
> +++ libcxx/trunk/include/thread Thu Mar 28 10:00:04 2013
> @@ -144,9 +144,11 @@ template <class _Tp>
> __thread_specific_ptr<_Tp>::__thread_specific_ptr()
> {
> int __ec = pthread_key_create(&__key_,
> &__thread_specific_ptr::__at_thread_exit);
> +#ifndef _LIBCPP_NO_EXCEPTIONS
> if (__ec)
> throw system_error(error_code(__ec, system_category()),
> "__thread_specific_ptr construction failed");
> +#endif
> }
>
> I don't know if you typically worry about warnings, but "__ec" is now
unused when _LIBCPP_NO_EXCEPTIONS is defined.
-- Matthieu
> template <class _Tp>
>
>
>
_______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130328/d44aecd2/attachment.html>
More information about the cfe-commits
mailing list