Index: include/llvm/ADT/IntervalMap.h =================================================================== --- include/llvm/ADT/IntervalMap.h +++ include/llvm/ADT/IntervalMap.h @@ -1040,8 +1040,17 @@ public: explicit IntervalMap(Allocator &a) : height(0), rootSize(0), allocator(a) { +#if defined(_MSC_VER) && !defined(_WIN64) + // x86 MSVC doesn't apply automatically (without `__declspec(align(...))`) + // alignments more than 4 bytes, even if `alignof` has returned so. + // The explanation: + // https://docs.microsoft.com/en-us/cpp/build/conflicts-with-the-x86-compiler + assert((uintptr_t(data.buffer) & (alignof(RootLeaf) - 1) & 3) == 0 && + "Insufficient alignment"); +#else assert((uintptr_t(data.buffer) & (alignof(RootLeaf) - 1)) == 0 && "Insufficient alignment"); +#endif new(&rootLeaf()) RootLeaf(); }