diff --git a/include/llvm/Support/Allocator.h b/include/llvm/Support/Allocator.h index 916413247b4..06413225a98 100644 --- a/include/llvm/Support/Allocator.h +++ b/include/llvm/Support/Allocator.h @@ -255,7 +255,7 @@ private: // size threshold. That will be fixed in a subsequent commit to make the // growth even more predictable. size_t AllocatedSlabSize = - SlabSize * (1 << std::min(30, NumSlabs / 128)); + SlabSize * ((size_t)1 << std::min(30, NumSlabs / 128)); MemSlab *NewSlab = Allocator.Allocate(AllocatedSlabSize); NewSlab->NextPtr = CurSlab;