diff --git a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h --- a/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ b/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h @@ -481,13 +481,6 @@ std::function()> createLocalIndirectStubsManagerBuilder(const Triple &T); -/// Build a function pointer of FunctionType with the given constant -/// address. -/// -/// Usage example: Turn a trampoline address into a function pointer constant -/// for use in a stub. -Constant *createIRTypedAddress(FunctionType &FT, ExecutorAddr Addr); - /// Create a function pointer with the given type, name, and initializer /// in the given Module. GlobalVariable *createImplPointer(PointerType &PT, Module &M, const Twine &Name, diff --git a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp --- a/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -240,15 +240,6 @@ } } -Constant* createIRTypedAddress(FunctionType &FT, ExecutorAddr Addr) { - Constant *AddrIntVal = - ConstantInt::get(Type::getInt64Ty(FT.getContext()), Addr.getValue()); - Constant *AddrPtrVal = - ConstantExpr::getCast(Instruction::IntToPtr, AddrIntVal, - PointerType::get(&FT, 0)); - return AddrPtrVal; -} - GlobalVariable* createImplPointer(PointerType &PT, Module &M, const Twine &Name, Constant *Initializer) { auto IP = new GlobalVariable(M, &PT, false, GlobalValue::ExternalLinkage,