summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2015-04-15 04:46:01 +0000
committerLang Hames <lhames@gmail.com>2015-04-15 04:46:01 +0000
commit042e35cab9e93324d44f5e182a7eb20d7fab08cb (patch)
tree2273a4d0e6a09b9c73fc2ad5ded43dc2d2b0683d /llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
parent20abd6bc04936ff2ec7ec01386780e7c0c022117 (diff)
downloadbcm5719-llvm-042e35cab9e93324d44f5e182a7eb20d7fab08cb.tar.gz
bcm5719-llvm-042e35cab9e93324d44f5e182a7eb20d7fab08cb.zip
[RuntimeDyld] Add casts to make delta computation 64-bit.
Hopefully this will fix the i686/msvc build failure described at: http://bb.pgr.jp/builders/ninja-clang-i686-msc18-R/builds/803 llvm-svn: 234977
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
index 66ecba30b18..675063c81d6 100644
--- a/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
+++ b/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
@@ -244,7 +244,8 @@ unsigned char *RuntimeDyldMachOCRTPBase<Impl>::processFDE(unsigned char *P,
}
static int64_t computeDelta(SectionEntry *A, SectionEntry *B) {
- int64_t ObjDistance = A->ObjAddress - B->ObjAddress;
+ int64_t ObjDistance =
+ static_cast<int64_t>(A->ObjAddress) - static_cast<int64_t>(B->ObjAddress);
int64_t MemDistance = A->LoadAddress - B->LoadAddress;
return ObjDistance - MemDistance;
}
OpenPOWER on IntegriCloud