diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp index d70ffdf10651..1cdc29b811c3 100644 --- a/libcxxabi/src/cxa_demangle.cpp +++ b/libcxxabi/src/cxa_demangle.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -1890,7 +1891,7 @@ class BumpPointerAllocator { static constexpr size_t AllocSize = 4096; static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta); - alignas(16) char InitialBuffer[AllocSize]; + alignas(std::max_align_t) char InitialBuffer[AllocSize]; BlockMeta* BlockList = nullptr; void grow() { diff --git a/llvm/lib/Demangle/ItaniumDemangle.cpp b/llvm/lib/Demangle/ItaniumDemangle.cpp index 8dd182fad150..c7bba85f5d88 100644 --- a/llvm/lib/Demangle/ItaniumDemangle.cpp +++ b/llvm/lib/Demangle/ItaniumDemangle.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1950,7 +1951,7 @@ class BumpPointerAllocator { static constexpr size_t AllocSize = 4096; static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta); - alignas(16) char InitialBuffer[AllocSize]; + alignas(std::max_align_t) char InitialBuffer[AllocSize]; BlockMeta* BlockList = nullptr; void grow() {