diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-11-19 10:03:09 +0000 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2012-11-19 10:03:09 +0000 |
commit | 1fcbb8fbf96b24ca7c16b993eccd68b0d61dc8a3 (patch) | |
tree | b15211f4a535b3f7f6ce4285f12793ab309d10b9 /include | |
parent | 4a8654e89311359d655c2948e3311b61d9ff9f1a (diff) |
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 'include')
-rw-r--r-- | include/llvm/Object/RelocVisitor.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llvm/Object/RelocVisitor.h b/include/llvm/Object/RelocVisitor.h index 7668bdedb7..17e52edd5d 100644 --- a/include/llvm/Object/RelocVisitor.h +++ b/include/llvm/Object/RelocVisitor.h @@ -80,17 +80,17 @@ private: RelocToApply zeroExtend(RelocToApply r, char Width) { if (Width == r.Width) return r; - r.Value &= (1 << ((Width * 8))) - 1; + r.Value &= (1LL << ((Width * 8))) - 1; return r; } RelocToApply signExtend(RelocToApply r, char Width) { if (Width == r.Width) return r; - bool SignBit = r.Value & (1 << ((Width * 8) - 1)); + bool SignBit = r.Value & (1LL << ((Width * 8) - 1)); if (SignBit) { - r.Value |= ~((1 << (Width * 8)) - 1); + r.Value |= ~((1LL << (Width * 8)) - 1); } else { - r.Value &= (1 << (Width * 8)) - 1; + r.Value &= (1LL << (Width * 8)) - 1; } return r; } |