aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MachObjectWriter.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2010-04-08 15:25:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2010-04-08 15:25:57 +0000
commit724918c687279b563becce0cdaa0371a4dcc0aa9 (patch)
treed0d764f72068fc3ddabf8f25f26c49c3189a4dce /lib/MC/MachObjectWriter.cpp
parentd36c6bfa5d6e118413489f8f10de955db1f07c33 (diff)
downloadexternal_llvm-724918c687279b563becce0cdaa0371a4dcc0aa9.zip
external_llvm-724918c687279b563becce0cdaa0371a4dcc0aa9.tar.gz
external_llvm-724918c687279b563becce0cdaa0371a4dcc0aa9.tar.bz2
Various MSVC warning fixes about truncated 64 bit shifts and const pointers passed to free.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100767 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MachObjectWriter.cpp')
-rw-r--r--lib/MC/MachObjectWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/MC/MachObjectWriter.cpp b/lib/MC/MachObjectWriter.cpp
index fc35c36..a533ccf 100644
--- a/lib/MC/MachObjectWriter.cpp
+++ b/lib/MC/MachObjectWriter.cpp
@@ -477,7 +477,7 @@ public:
// actual expression addend without the PCrel bias. However, instructions
// with data following the relocation are not accomodated for (see comment
// below regarding SIGNED{1,2,4}), so it isn't exactly that either.
- Value += 1 << Log2Size;
+ Value += 1LL << Log2Size;
}
if (Target.isAbsolute()) { // constant
@@ -605,7 +605,7 @@ public:
// well based on the actual encoded instruction (the additional bias),
// but instead appear to just look at the final offset.
if (IsRIPRel) {
- switch (-(Target.getConstant() + (1 << Log2Size))) {
+ switch (-(Target.getConstant() + (1LL << Log2Size))) {
case 1: Type = RIT_X86_64_Signed1; break;
case 2: Type = RIT_X86_64_Signed2; break;
case 4: Type = RIT_X86_64_Signed4; break;