From: Lang Hames Date: Wed, 15 Apr 2015 04:46:01 +0000 (+0000) Subject: [RuntimeDyld] Add casts to make delta computation 64-bit. X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=29da6378264333420481f421b05078ce0af58e0a [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234977 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp index 66ecba30b18..675063c81d6 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp @@ -244,7 +244,8 @@ unsigned char *RuntimeDyldMachOCRTPBase::processFDE(unsigned char *P, } static int64_t computeDelta(SectionEntry *A, SectionEntry *B) { - int64_t ObjDistance = A->ObjAddress - B->ObjAddress; + int64_t ObjDistance = + static_cast(A->ObjAddress) - static_cast(B->ObjAddress); int64_t MemDistance = A->LoadAddress - B->LoadAddress; return ObjDistance - MemDistance; }