diff --git a/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp b/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp index 44d01219607e..e71fc65ce24b 100644 --- a/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp +++ b/llvm/lib/ExecutionEngine/Orc/OrcTargetSupport.cpp @@ -52,8 +52,9 @@ const char* OrcX86_64::ResolverBlockName = "orc_resolver_block"; void OrcX86_64::insertResolverBlock( Module &M, JITCompileCallbackManagerBase &JCBM) { - uint64_t CallbackAddr = static_cast( - reinterpret_cast(executeCompileCallback)); + auto CallbackPtr = executeCompileCallback; + uint64_t CallbackAddr = + static_cast(reinterpret_cast(CallbackPtr)); std::ostringstream AsmStream; Triple TT(M.getTargetTriple());