[libcxx-commits] [libcxx] Lower std::string's alignment requirement from 16 to 8. (PR #68807)

via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 12 13:43:45 PDT 2023


================
@@ -18,7 +18,13 @@
 #include "test_macros.h"
 
 // alignment of the string heap buffer is hardcoded to 16
-static const std::size_t alignment = 16;
+
+static const std::size_t alignment =
+#ifdef _LIBCPP_ABI_STRING_8_BYTE_ALIGNMENT
----------------
EricWF wrote:

It was easier for me to write that patch on top  of HEAD, rather than this change. But here it is as requested.
#68925

https://github.com/llvm/llvm-project/pull/68807


More information about the libcxx-commits mailing list