From f2529ba12735ee13f717352088ed0be2a18973d3 Mon Sep 17 00:00:00 2001 From: Rui Ueyama Date: Mon, 31 Mar 2014 20:04:37 +0000 Subject: [PATCH] Fix MSVC warning. This patch is to fix the following warning when compiled with MSVC 64 bit. warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205245 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/Allocator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.11.0