[RuntimeDyld] Fix a class of arithmetic errors introduced in r253918
authorSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Nov 2015 20:37:01 +0000 (20:37 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Tue, 24 Nov 2015 20:37:01 +0000 (20:37 +0000)
commit0a10aff3d92aa4339013f9646d5a38fd6a79de4f
tree54f48e28a07e6f65f8d30f35d1d4a48eb5927d04
parent24dc54c6a5d2179f70c8334bc8ba00fddd066de2
[RuntimeDyld] Fix a class of arithmetic errors introduced in r253918

r253918 had refactored expressions like "A - B.Address + C" to "A -
B.getAddressWithOffset(C)".  This is incorrect, since the latter really
computes "A - B.Address - C".

None of the tests I can run locally on x86 broke due to this bug, but it
is the current suspect for breakage on the AArch64 buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254017 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp