[llvm] r205245 - Fix MSVC warning.
Rui Ueyama
ruiu at google.com
Mon Mar 31 13:04:37 PDT 2014
Author: ruiu
Date: Mon Mar 31 15:04:37 2014
New Revision: 205245
URL: http://llvm.org/viewvc/llvm-project?rev=205245&view=rev
Log:
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?)
Modified:
llvm/trunk/include/llvm/Support/Allocator.h
Modified: llvm/trunk/include/llvm/Support/Allocator.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Allocator.h?rev=205245&r1=205244&r2=205245&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Allocator.h (original)
+++ llvm/trunk/include/llvm/Support/Allocator.h Mon Mar 31 15:04:37 2014
@@ -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<size_t>(30, NumSlabs / 128));
+ SlabSize * ((size_t)1 << std::min<size_t>(30, NumSlabs / 128));
MemSlab *NewSlab = Allocator.Allocate(AllocatedSlabSize);
NewSlab->NextPtr = CurSlab;
More information about the llvm-commits
mailing list