Index: unittests/Support/AllocatorTest.cpp =================================================================== --- unittests/Support/AllocatorTest.cpp +++ unittests/Support/AllocatorTest.cpp @@ -17,9 +17,9 @@ TEST(AllocatorTest, Basics) { BumpPtrAllocator Alloc; - int *a = (int*)Alloc.Allocate(sizeof(int), 1); - int *b = (int*)Alloc.Allocate(sizeof(int) * 10, 1); - int *c = (int*)Alloc.Allocate(sizeof(int), 1); + int *a = (int*)Alloc.Allocate(sizeof(int), alignof(int)); + int *b = (int*)Alloc.Allocate(sizeof(int) * 10, alignof(int)); + int *c = (int*)Alloc.Allocate(sizeof(int), alignof(int)); *a = 1; b[0] = 2; b[9] = 2; Index: unittests/Support/BinaryStreamTest.cpp =================================================================== --- unittests/Support/BinaryStreamTest.cpp +++ unittests/Support/BinaryStreamTest.cpp @@ -686,7 +686,8 @@ std::vector Foos = {{1, 1.0}, {2, 2.0}, {3, 3.0}}; BumpPtrAllocator Allocator; for (const auto &F : Foos) { - uint8_t *Ptr = Allocator.Allocate(sizeof(Foo)); + uint8_t *Ptr = static_cast(Allocator.Allocate(sizeof(Foo), + alignof(Foo))); MutableArrayRef Buffer(Ptr, sizeof(Foo)); MutableBinaryByteStream Stream(Buffer, llvm::support::big); BinaryStreamWriter Writer(Stream);