[PATCH] D48889: [demangler] Ensure proper alignment in BumpPointerAllocator

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 4 07:18:08 PDT 2018


sepavloff updated this revision to Diff 154108.
sepavloff added a comment.

Updated patch


Repository:
  rL LLVM

https://reviews.llvm.org/D48889

Files:
  lib/Demangle/ItaniumDemangle.cpp


Index: lib/Demangle/ItaniumDemangle.cpp
===================================================================
--- lib/Demangle/ItaniumDemangle.cpp
+++ lib/Demangle/ItaniumDemangle.cpp
@@ -1950,7 +1950,7 @@
   static constexpr size_t AllocSize = 4096;
   static constexpr size_t UsableAllocSize = AllocSize - sizeof(BlockMeta);
 
-  alignas(16) char InitialBuffer[AllocSize];
+  alignas(alignof(long double)) char InitialBuffer[AllocSize];
   BlockMeta* BlockList = nullptr;
 
   void grow() {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48889.154108.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180704/047018f0/attachment.bin>


More information about the llvm-commits mailing list