diff options
author | Louis Dionne <ldionne.2@gmail.com> | 2022-12-02 13:45:49 -0800 |
---|---|---|
committer | Louis Dionne <ldionne.2@gmail.com> | 2023-01-26 14:41:13 -0500 |
commit | 36080434a8858c33f2af2382be748caed131385f (patch) | |
tree | c1ff0a648ef822aa872d71e78ba5be2a534995c9 /libcxxabi/test | |
parent | 2e3153059c268700d4b399a8cbba28e9c2514e09 (diff) | |
download | llvm-36080434a8858c33f2af2382be748caed131385f.tar.gz |
[libc++] Move the definition of aligned allocation helpers outside of <new>
They are not needed in <new> -- in fact they are only needed in .cpp files.
Getting those out of the way makes the headers smaller and also makes it
easier to use the library on platforms where aligned allocation is not
available.
Differential Revision: https://reviews.llvm.org/D139231
Diffstat (limited to 'libcxxabi/test')
-rw-r--r-- | libcxxabi/test/test_fallback_malloc.pass.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |