Fix MSVC 2012 warning about a 32-bit shift that should be 64-bit
authorReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 15:35:56 +0000 (15:35 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 25 Jan 2013 15:35:56 +0000 (15:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173454 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Attributes.cpp

index 8ee7057c1962d9d028c9a1e0cdedaff0441f1123..cbbf4848f6d634aa35ac785c5d75042aabf52240 100644 (file)
@@ -524,12 +524,12 @@ bool AttributeImpl::hasAttributes() const {
 
 uint64_t AttributeImpl::getAlignment() const {
   uint64_t Mask = Raw() & getAttrMask(Attribute::Alignment);
-  return 1U << ((Mask >> 16) - 1);
+  return 1ULL << ((Mask >> 16) - 1);
 }
 
 uint64_t AttributeImpl::getStackAlignment() const {
   uint64_t Mask = Raw() & getAttrMask(Attribute::StackAlignment);
-  return 1U << ((Mask >> 26) - 1);
+  return 1ULL << ((Mask >> 26) - 1);
 }
 
 void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data,