Skip to content

Commit 29da637

Browse files
committed
[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
1 parent a01f355 commit 29da637

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,8 @@ unsigned char *RuntimeDyldMachOCRTPBase<Impl>::processFDE(unsigned char *P,
244244
}
245245

246246
static int64_t computeDelta(SectionEntry *A, SectionEntry *B) {
247-
int64_t ObjDistance = A->ObjAddress - B->ObjAddress;
247+
int64_t ObjDistance =
248+
static_cast<int64_t>(A->ObjAddress) - static_cast<int64_t>(B->ObjAddress);
248249
int64_t MemDistance = A->LoadAddress - B->LoadAddress;
249250
return ObjDistance - MemDistance;
250251
}

0 commit comments

Comments
 (0)