libc++: switch from using _ATTRIBUTE(noreturn) (which conflicts with a
platform-provided macro on some systems) to _LIBCPP_NORETURN. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160773 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8131a01a9c
commit
0405cc4ae0
@ -182,9 +182,9 @@ typedef __char32_t char32_t;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if __has_feature(cxx_attributes)
|
#if __has_feature(cxx_attributes)
|
||||||
# define _ATTRIBUTE(x) [[x]]
|
# define _LIBCPP_NORETURN [[noreturn]]
|
||||||
#else
|
#else
|
||||||
# define _ATTRIBUTE(x) __attribute__ ((x))
|
# define _LIBCPP_NORETURN __attribute__ ((noreturn))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
#define _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS
|
||||||
@ -277,7 +277,7 @@ namespace std {
|
|||||||
|
|
||||||
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
|
#define _ALIGNAS(x) __attribute__((__aligned__(x)))
|
||||||
|
|
||||||
#define _ATTRIBUTE(x) __attribute__((x))
|
#define _LIBCPP_NORETURN __attribute__((noreturn))
|
||||||
|
|
||||||
#if !__EXCEPTIONS
|
#if !__EXCEPTIONS
|
||||||
#define _LIBCPP_NO_EXCEPTIONS
|
#define _LIBCPP_NO_EXCEPTIONS
|
||||||
@ -349,7 +349,7 @@ using namespace _LIBCPP_NAMESPACE __attribute__((__strong__));
|
|||||||
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
#define _LIBCPP_HAS_NO_UNICODE_CHARS
|
||||||
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
#define _LIBCPP_HAS_NO_DELETED_FUNCTIONS
|
||||||
#define __alignof__ __alignof
|
#define __alignof__ __alignof
|
||||||
#define _ATTRIBUTE __declspec
|
#define _LIBCPP_NORETURN __declspec(noreturn)
|
||||||
#define _ALIGNAS(x) __declspec(align(x))
|
#define _ALIGNAS(x) __declspec(align(x))
|
||||||
#define _LIBCPP_HAS_NO_VARIADICS
|
#define _LIBCPP_HAS_NO_VARIADICS
|
||||||
|
|
||||||
|
@ -107,19 +107,19 @@ public:
|
|||||||
typedef void (*unexpected_handler)();
|
typedef void (*unexpected_handler)();
|
||||||
_LIBCPP_VISIBLE unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
|
_LIBCPP_VISIBLE unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
|
||||||
_LIBCPP_VISIBLE unexpected_handler get_unexpected() _NOEXCEPT;
|
_LIBCPP_VISIBLE unexpected_handler get_unexpected() _NOEXCEPT;
|
||||||
_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void unexpected();
|
_LIBCPP_NORETURN _LIBCPP_VISIBLE void unexpected();
|
||||||
|
|
||||||
typedef void (*terminate_handler)();
|
typedef void (*terminate_handler)();
|
||||||
_LIBCPP_VISIBLE terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
|
_LIBCPP_VISIBLE terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
|
||||||
_LIBCPP_VISIBLE terminate_handler get_terminate() _NOEXCEPT;
|
_LIBCPP_VISIBLE terminate_handler get_terminate() _NOEXCEPT;
|
||||||
_ATTRIBUTE(noreturn) _LIBCPP_VISIBLE void terminate() _NOEXCEPT;
|
_LIBCPP_NORETURN _LIBCPP_VISIBLE void terminate() _NOEXCEPT;
|
||||||
|
|
||||||
_LIBCPP_VISIBLE bool uncaught_exception() _NOEXCEPT;
|
_LIBCPP_VISIBLE bool uncaught_exception() _NOEXCEPT;
|
||||||
|
|
||||||
class exception_ptr;
|
class exception_ptr;
|
||||||
|
|
||||||
exception_ptr current_exception() _NOEXCEPT;
|
exception_ptr current_exception() _NOEXCEPT;
|
||||||
_ATTRIBUTE(noreturn) void rethrow_exception(exception_ptr);
|
_LIBCPP_NORETURN void rethrow_exception(exception_ptr);
|
||||||
|
|
||||||
class _LIBCPP_VISIBLE exception_ptr
|
class _LIBCPP_VISIBLE exception_ptr
|
||||||
{
|
{
|
||||||
@ -143,7 +143,7 @@ public:
|
|||||||
{return !(__x == __y);}
|
{return !(__x == __y);}
|
||||||
|
|
||||||
friend exception_ptr current_exception() _NOEXCEPT;
|
friend exception_ptr current_exception() _NOEXCEPT;
|
||||||
_ATTRIBUTE(noreturn) friend void rethrow_exception(exception_ptr);
|
_LIBCPP_NORETURN friend void rethrow_exception(exception_ptr);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class _Ep>
|
template<class _Ep>
|
||||||
@ -174,7 +174,7 @@ public:
|
|||||||
virtual ~nested_exception() _NOEXCEPT;
|
virtual ~nested_exception() _NOEXCEPT;
|
||||||
|
|
||||||
// access functions
|
// access functions
|
||||||
_ATTRIBUTE(noreturn) void rethrow_nested() const;
|
_LIBCPP_NORETURN void rethrow_nested() const;
|
||||||
_LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;}
|
_LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ struct __nested
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
throw_with_nested(_Tp&& __t, typename enable_if<
|
throw_with_nested(_Tp&& __t, typename enable_if<
|
||||||
@ -206,7 +206,7 @@ throw_with_nested (_Tp& __t, typename enable_if<
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class _Tp>
|
template <class _Tp>
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
#ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
|
||||||
throw_with_nested(_Tp&& __t, typename enable_if<
|
throw_with_nested(_Tp&& __t, typename enable_if<
|
||||||
|
@ -56,7 +56,7 @@ get_unexpected() _NOEXCEPT
|
|||||||
return __sync_fetch_and_add(&__unexpected_handler, (unexpected_handler)0);
|
return __sync_fetch_and_add(&__unexpected_handler, (unexpected_handler)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
unexpected()
|
unexpected()
|
||||||
{
|
{
|
||||||
@ -77,7 +77,7 @@ get_terminate() _NOEXCEPT
|
|||||||
return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
|
return __sync_fetch_and_add(&__terminate_handler, (terminate_handler)0);
|
||||||
}
|
}
|
||||||
|
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
terminate() _NOEXCEPT
|
terminate() _NOEXCEPT
|
||||||
{
|
{
|
||||||
@ -184,7 +184,7 @@ nested_exception::~nested_exception() _NOEXCEPT
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void
|
void
|
||||||
nested_exception::rethrow_nested() const
|
nested_exception::rethrow_nested() const
|
||||||
{
|
{
|
||||||
@ -209,7 +209,7 @@ exception_ptr current_exception() _NOEXCEPT
|
|||||||
#endif // __APPLE__
|
#endif // __APPLE__
|
||||||
}
|
}
|
||||||
|
|
||||||
_ATTRIBUTE(noreturn)
|
_LIBCPP_NORETURN
|
||||||
void rethrow_exception(exception_ptr p)
|
void rethrow_exception(exception_ptr p)
|
||||||
{
|
{
|
||||||
#if HAVE_DEPENDENT_EH_ABI
|
#if HAVE_DEPENDENT_EH_ABI
|
||||||
|
Loading…
x
Reference in New Issue
Block a user