diff options
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/src/fallback_malloc.cpp | 2 | ||||
-rw-r--r-- | libcxxabi/src/stdlib_new_delete.cpp | 3 | ||||
-rw-r--r-- | libcxxabi/test/test_fallback_malloc.pass.cpp | 3 |
3 files changed, 6 insertions, 2 deletions
diff --git a/libcxxabi/src/fallback_malloc.cpp b/libcxxabi/src/fallback_malloc.cpp index 591efbefc8a5..f9fb1bc46302 100644 --- a/libcxxabi/src/fallback_malloc.cpp +++ b/libcxxabi/src/fallback_malloc.cpp @@ -15,10 +15,10 @@ #endif #endif +#include <__memory/aligned_alloc.h> #include <assert.h> #include <stdlib.h> // for malloc, calloc, free #include <string.h> // for memset -#include <new> // for std::__libcpp_aligned_{alloc,free} // A small, simple heap manager based (loosely) on // the startup heap manager from FreeBSD, optimized for space. diff --git a/libcxxabi/src/stdlib_new_delete.cpp b/libcxxabi/src/stdlib_new_delete.cpp index 4a664e15a50f..483b9f1e81e9 100644 --- a/libcxxabi/src/stdlib_new_delete.cpp +++ b/libcxxabi/src/stdlib_new_delete.cpp @@ -9,8 +9,9 @@ //===----------------------------------------------------------------------===// #include "__cxxabi_config.h" -#include <new> +#include <__memory/aligned_alloc.h> #include <cstdlib> +#include <new> #if !defined(_THROW_BAD_ALLOC) || !defined(_LIBCXXABI_WEAK) #error The _THROW_BAD_ALLOC and _LIBCXXABI_WEAK libc++ macros must \ diff --git a/libcxxabi/test/test_fallback_malloc.pass.cpp b/libcxxabi/test/test_fallback_malloc.pass.cpp index d7decd9d7924..e7d22a57d2bc 100644 --- a/libcxxabi/test/test_fallback_malloc.pass.cpp +++ b/libcxxabi/test/test_fallback_malloc.pass.cpp @@ -24,9 +24,12 @@ typedef std::deque<void *> container; +TEST_DIAGNOSTIC_PUSH +TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header") // #define DEBUG_FALLBACK_MALLOC #define INSTRUMENT_FALLBACK_MALLOC #include "../src/fallback_malloc.cpp" +TEST_DIAGNOSTIC_POP void assertAlignment(void* ptr) { assert(reinterpret_cast<size_t>(ptr) % alignof(FallbackMaxAlignType) == 0); } |