aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2012-11-19 10:03:09 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2012-11-19 10:03:09 +0000
commit1fcbb8fbf96b24ca7c16b993eccd68b0d61dc8a3 (patch)
treeb15211f4a535b3f7f6ce4285f12793ab309d10b9 /lib
parent4a8654e89311359d655c2948e3311b61d9ff9f1a (diff)
downloadexternal_llvm-1fcbb8fbf96b24ca7c16b993eccd68b0d61dc8a3.zip
external_llvm-1fcbb8fbf96b24ca7c16b993eccd68b0d61dc8a3.tar.gz
external_llvm-1fcbb8fbf96b24ca7c16b993eccd68b0d61dc8a3.tar.bz2
Promote the constant 1 to long long, 1LL or 1ULL in int64_t-sensitive context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168304 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/VMCore/Attributes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp
index 5a552c3..68aa954 100644
--- a/lib/VMCore/Attributes.cpp
+++ b/lib/VMCore/Attributes.cpp
@@ -281,14 +281,14 @@ bool AttrBuilder::hasAlignmentAttr() const {
uint64_t AttrBuilder::getAlignment() const {
if (!hasAlignmentAttr())
return 0;
- return 1U <<
+ return 1ULL <<
(((Bits & AttributesImpl::getAttrMask(Attributes::Alignment)) >> 16) - 1);
}
uint64_t AttrBuilder::getStackAlignment() const {
if (!hasAlignmentAttr())
return 0;
- return 1U <<
+ return 1ULL <<
(((Bits & AttributesImpl::getAttrMask(Attributes::StackAlignment))>>26)-1);
}