[llvm] r234977 - [RuntimeDyld] Add casts to make delta computation 64-bit.
Lang Hames
lhames at gmail.com
Tue Apr 14 21:46:01 PDT 2015
Author: lhames
Date: Tue Apr 14 23:46:01 2015
New Revision: 234977
URL: http://llvm.org/viewvc/llvm-project?rev=234977&view=rev
Log:
[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
Modified:
llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
Modified: llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp?rev=234977&r1=234976&r2=234977&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp Tue Apr 14 23:46:01 2015
@@ -244,7 +244,8 @@ unsigned char *RuntimeDyldMachOCRTPBase<
}
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;
}
More information about the llvm-commits
mailing list