From 7032f3cbe4e6a27cffa91fcbc3e3a77cdf94bc0f Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 27 Nov 2014 01:41:16 +0000 Subject: [PATCH] [MCJIT] Replace JITEventListener::anchor (temporarily removed in r222861), and move GDBRegistrationListener into ExecutionEngine to avoid layering violation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222864 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ExecutionEngine/JITEventListener.h | 2 ++ lib/ExecutionEngine/CMakeLists.txt | 1 + lib/ExecutionEngine/ExecutionEngine.cpp | 2 ++ .../{RuntimeDyld => }/GDBRegistrationListener.cpp | 0 lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt | 1 - 5 files changed, 5 insertions(+), 1 deletion(-) rename lib/ExecutionEngine/{RuntimeDyld => }/GDBRegistrationListener.cpp (100%) diff --git a/include/llvm/ExecutionEngine/JITEventListener.h b/include/llvm/ExecutionEngine/JITEventListener.h index dd52dfbdaf9..c3edec86878 100644 --- a/include/llvm/ExecutionEngine/JITEventListener.h +++ b/include/llvm/ExecutionEngine/JITEventListener.h @@ -113,6 +113,8 @@ public: return nullptr; } #endif // USE_OPROFILE +private: + virtual void anchor(); }; } // end namespace llvm. diff --git a/lib/ExecutionEngine/CMakeLists.txt b/lib/ExecutionEngine/CMakeLists.txt index 208495c8847..dc2fe9bf97f 100644 --- a/lib/ExecutionEngine/CMakeLists.txt +++ b/lib/ExecutionEngine/CMakeLists.txt @@ -3,6 +3,7 @@ add_llvm_library(LLVMExecutionEngine ExecutionEngine.cpp ExecutionEngineBindings.cpp + GDBRegistrationListener.cpp RTDyldMemoryManager.cpp TargetSelect.cpp ) diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 20d1631a0ce..9ca0330d792 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -48,6 +48,8 @@ ExecutionEngine *(*ExecutionEngine::MCJITCtor)( ExecutionEngine *(*ExecutionEngine::InterpCtor)(std::unique_ptr M, std::string *ErrorStr) =nullptr; +void JITEventListener::anchor() {} + ExecutionEngine::ExecutionEngine(std::unique_ptr M) : EEState(*this), LazyFunctionCreator(nullptr) { diff --git a/lib/ExecutionEngine/RuntimeDyld/GDBRegistrationListener.cpp b/lib/ExecutionEngine/GDBRegistrationListener.cpp similarity index 100% rename from lib/ExecutionEngine/RuntimeDyld/GDBRegistrationListener.cpp rename to lib/ExecutionEngine/GDBRegistrationListener.cpp diff --git a/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt b/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt index 583d7a0aa41..5790eee9c82 100644 --- a/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt +++ b/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt @@ -1,5 +1,4 @@ add_llvm_library(LLVMRuntimeDyld - GDBRegistrationListener.cpp RuntimeDyld.cpp RuntimeDyldChecker.cpp RuntimeDyldELF.cpp