[llvm] 31b5b12 - [ORC] Remove a spurious reinterpret_cast.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 12:43:19 PDT 2020


Author: Lang Hames
Date: 2020-07-13T12:39:24-07:00
New Revision: 31b5b121299c08f360b61ecf873fe3eee99c0499

URL: https://github.com/llvm/llvm-project/commit/31b5b121299c08f360b61ecf873fe3eee99c0499
DIFF: https://github.com/llvm/llvm-project/commit/31b5b121299c08f360b61ecf873fe3eee99c0499.diff

LOG: [ORC] Remove a spurious reinterpret_cast.

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp b/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
index 5f89d91ef994..18b3c5e12b1c 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp
@@ -461,9 +461,7 @@ void OrcI386::writeTrampolines(char *TrampolineWorkingMem,
   assert((ResolverAddr >> 32) == 0 && "ResolverAddr out of range");
 
   uint64_t CallRelImm = 0xF1C4C400000000e8;
-  uint64_t ResolverRel =
-      ResolverAddr - reinterpret_cast<uint64_t>(TrampolineBlockTargetAddress) -
-      5;
+  uint64_t ResolverRel = ResolverAddr - TrampolineBlockTargetAddress - 5;
 
   uint64_t *Trampolines = reinterpret_cast<uint64_t *>(TrampolineWorkingMem);
   for (unsigned I = 0; I < NumTrampolines; ++I, ResolverRel -= TrampolineSize)


        


More information about the llvm-commits mailing list