From: Rui Ueyama Date: Mon, 31 Mar 2014 20:04:37 +0000 (+0000) Subject: Fix MSVC warning. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=f2529ba12735ee13f717352088ed0be2a18973d3;p=oota-llvm.git 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 --- 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;