[MCJIT] Replace a c-style cast with reinterpret_cast + static_cast.
authorLang Hames <lhames@gmail.com>
Thu, 7 Aug 2014 20:41:57 +0000 (20:41 +0000)
committerLang Hames <lhames@gmail.com>
Thu, 7 Aug 2014 20:41:57 +0000 (20:41 +0000)
commit362510890ff2e1838450bb6ab91ef4e465c1d3a8
tree41dbce64927545327a6f915d6cdf61de8ece9e8d
parentc00ae934322b82493ef3fe429c3373028e7fe97d
[MCJIT] Replace a c-style cast with reinterpret_cast + static_cast.

C-style casts (and reinterpret_casts) result in implementation defined
values when a pointer is cast to a larger integer type. On some platforms
this was leading to bogus address computations in RuntimeDyldMachOAArch64.

This should fix http://llvm.org/PR20501.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215143 91177308-0d34-0410-b5e6-96231b3b80d8
lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h