mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-10 18:11:19 +00:00
mark operator new(std::nothrow) as noalias (aka __attribute__((malloc))
llvm-svn: 159359
This commit is contained in:
parent
ee3d99f6be
commit
6317bfb26a
@ -391,6 +391,12 @@ template <unsigned> struct __static_assert_check {};
|
||||
#define _LIBCPP_CONSTEXPR constexpr
|
||||
#endif
|
||||
|
||||
#ifdef __GNUC__
|
||||
#define _NOALIAS __attribute__((malloc))
|
||||
#else
|
||||
#define _NOALIAS
|
||||
#endif
|
||||
|
||||
#ifndef __has_feature
|
||||
#define __has_feature(__x) 0
|
||||
#endif
|
||||
|
@ -96,7 +96,7 @@ _LIBCPP_VISIBLE void* operator new(std::size_t __sz)
|
||||
throw(std::bad_alloc)
|
||||
#endif
|
||||
;
|
||||
_LIBCPP_VISIBLE void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT;
|
||||
_LIBCPP_VISIBLE void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
|
||||
_LIBCPP_VISIBLE void operator delete(void* __p) _NOEXCEPT;
|
||||
_LIBCPP_VISIBLE void operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
|
||||
|
||||
@ -105,7 +105,7 @@ _LIBCPP_VISIBLE void* operator new[](std::size_t __sz)
|
||||
throw(std::bad_alloc)
|
||||
#endif
|
||||
;
|
||||
_LIBCPP_VISIBLE void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT;
|
||||
_LIBCPP_VISIBLE void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _NOALIAS;
|
||||
_LIBCPP_VISIBLE void operator delete[](void* __p) _NOEXCEPT;
|
||||
_LIBCPP_VISIBLE void operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user