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

Erik Pilkington via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 12:55:00 PDT 2018


erik.pilkington added a comment.

Hi, thanks for working on this!

We don't need 16-byte alignment on MSVC, we only need 8 because alignof(max_align_t) is 8 on that platform, and malloc is required to provide memory that's aligned to that boundary. We can't portable use max_align_t in LLVM (see the commit message in r336162), but I think we can get away with using alignof(long double). Have you considered this option instead of fixing up the alignment dynamically?


Repository:
  rL LLVM

https://reviews.llvm.org/D48889





More information about the llvm-commits mailing list