diff --git a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h index b7ee9b5937f..7dab5d1bc67 100644 --- a/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h +++ b/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h @@ -39,7 +39,7 @@ namespace orc { /// compiled and executed. template + typename IndirectStubsMgrT = IndirectStubsManager> class CompileOnDemandLayer { private: diff --git a/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h b/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h index aa75b3f46b4..e490d894390 100644 --- a/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h +++ b/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h @@ -211,13 +211,13 @@ private: }; /// @brief Base class for managing collections of named indirect stubs. -class IndirectStubsManagerBase { +class IndirectStubsManager { public: /// @brief Map type for initializing the manager. See init. typedef StringMap> StubInitsMap; - virtual ~IndirectStubsManagerBase() {} + virtual ~IndirectStubsManager() {} /// @brief Create a single stub with the given name, target address and flags. virtual std::error_code createStub(StringRef StubName, TargetAddress StubAddr, @@ -244,7 +244,7 @@ private: /// @brief IndirectStubsManager implementation for a concrete target, e.g. /// OrcX86_64. (See OrcTargetSupport.h). template -class IndirectStubsManager : public IndirectStubsManagerBase { +class LocalIndirectStubsManager : public IndirectStubsManager { public: std::error_code createStub(StringRef StubName, TargetAddress StubAddr, diff --git a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp b/lib/ExecutionEngine/Orc/IndirectionUtils.cpp index dd6e3a3b29a..34564e42b10 100644 --- a/lib/ExecutionEngine/Orc/IndirectionUtils.cpp +++ b/lib/ExecutionEngine/Orc/IndirectionUtils.cpp @@ -20,7 +20,7 @@ namespace llvm { namespace orc { void JITCompileCallbackManager::anchor() {} -void IndirectStubsManagerBase::anchor() {} +void IndirectStubsManager::anchor() {} Constant* createIRTypedAddress(FunctionType &FT, TargetAddress Addr) { Constant *AddrIntVal = diff --git a/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp b/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp index d1af56d8486..e519c7f3092 100644 --- a/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp +++ b/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp @@ -36,7 +36,8 @@ OrcCBindingsStack::createIndirectStubsMgrBuilder(Triple T) { case Triple::x86_64: return [](){ - return llvm::make_unique>(); + return llvm::make_unique< + orc::LocalIndirectStubsManager>(); }; } } diff --git a/lib/ExecutionEngine/Orc/OrcCBindingsStack.h b/lib/ExecutionEngine/Orc/OrcCBindingsStack.h index d2f7fe4ac0e..2e17624ff47 100644 --- a/lib/ExecutionEngine/Orc/OrcCBindingsStack.h +++ b/lib/ExecutionEngine/Orc/OrcCBindingsStack.h @@ -268,7 +268,7 @@ private: CompileLayerT CompileLayer; CODLayerT CODLayer; - std::unique_ptr IndirectStubsMgr; + std::unique_ptr IndirectStubsMgr; std::vector> GenericHandles; std::vector FreeHandleIndexes; diff --git a/tools/lli/OrcLazyJIT.cpp b/tools/lli/OrcLazyJIT.cpp index edac10b8655..4235145ee7a 100644 --- a/tools/lli/OrcLazyJIT.cpp +++ b/tools/lli/OrcLazyJIT.cpp @@ -65,7 +65,8 @@ OrcLazyJIT::createIndirectStubsMgrBuilder(Triple T) { case Triple::x86_64: return [](){ - return llvm::make_unique>(); + return llvm::make_unique< + orc::LocalIndirectStubsManager>(); }; } } diff --git a/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp b/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp index ca508d0a756..a27e649b616 100644 --- a/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp +++ b/unittests/ExecutionEngine/Orc/CompileOnDemandLayerTest.cpp @@ -23,7 +23,7 @@ public: void grow() override { llvm_unreachable("not implemented"); } }; -class DummyStubsManager : public orc::IndirectStubsManagerBase { +class DummyStubsManager : public orc::IndirectStubsManager { public: std::error_code createStub(StringRef StubName, TargetAddress InitAddr, JITSymbolFlags Flags) override {