[PATCH] D92509: ADT: Remove redundant `alignas` from IntervalMap, NFC

Duncan P. N. Exon Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 15 16:00:11 PST 2020


dexonsmith added a comment.

In D92509#2456538 <https://reviews.llvm.org/D92509#2456538>, @rnk wrote:

> Basically, it's an MSVC compiler bug: it won't align local variables unless they have explicit an `alignas` attribute. `std::aligned_union_t<...>` produces a type with the right size and alignment, but then the compiler doesn't follow through on the alignment for local variables. LLVM's implementation uses alignas, which makes it work.
>
> This should be documented in comments, I'll send that out.

Okay, sounds great, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92509/new/

https://reviews.llvm.org/D92509



More information about the llvm-commits mailing list