forked from OSchip/llvm-project
Update libc++abi's detection of aligned allocation after r344207.
llvm-svn: 344208
This commit is contained in:
parent
42f9868cd8
commit
51fbb2e70a
|
@ -7,7 +7,7 @@
|
|||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Define _LIBCPP_BUILDING_LIBRARY to ensure _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
|
||||
// Define _LIBCPP_BUILDING_LIBRARY to ensure _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
// is only defined when libc aligned allocation is not available.
|
||||
#define _LIBCPP_BUILDING_LIBRARY
|
||||
#include "fallback_malloc.h"
|
||||
|
@ -209,7 +209,7 @@ void* __aligned_malloc_with_fallback(size_t size) {
|
|||
#if defined(_WIN32)
|
||||
if (void* dest = _aligned_malloc(size, alignof(__aligned_type)))
|
||||
return dest;
|
||||
#elif defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
|
||||
#elif defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
|
||||
if (void* dest = std::malloc(size))
|
||||
return dest;
|
||||
#else
|
||||
|
|
|
@ -134,7 +134,7 @@ operator delete[] (void* ptr, size_t) _NOEXCEPT
|
|||
::operator delete[](ptr);
|
||||
}
|
||||
|
||||
#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
|
||||
#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
|
||||
|
||||
_LIBCXXABI_WEAK
|
||||
void *
|
||||
|
@ -260,4 +260,4 @@ operator delete[] (void* ptr, size_t, std::align_val_t alignment) _NOEXCEPT
|
|||
::operator delete[](ptr, alignment);
|
||||
}
|
||||
|
||||
#endif // !_LIBCPP_HAS_NO_ALIGNED_ALLOCATION
|
||||
#endif // !_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
|
||||
|
|
Loading…
Reference in New Issue