summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2018-05-23 23:56:09 +0000
committerZachary Turner <zturner@google.com>2018-05-23 23:56:09 +0000
commit8e8d4b91a8ac41d28e8db3a2b97143a0998856d8 (patch)
tree39c611718f39f4f77575d90bf475b1d67f3e03cb /lldb/source/Core/Module.cpp
parent500ca8713cff9d6b946593eab4186bcdc74d6367 (diff)
downloadbcm5719-llvm-8e8d4b91a8ac41d28e8db3a2b97143a0998856d8.tar.gz
bcm5719-llvm-8e8d4b91a8ac41d28e8db3a2b97143a0998856d8.zip
Break dependency from Core to ObjectFileJIT.
The only reason this was here was so that Module could have a function called CreateJITModule which created things in a special order. Instead of making this specific to creating JIT modules, I converted this into a template function that can create a module for any type of object file plugin and just forwards arguments through. Since the template is not instantiated in Core, the linker (and header file) dependency moves to the point where it is instantiated, which only happens in Expression. Conceptually, this location also makes more sense for a dependency on ObjectFileJIT. After all, we JIT expressions so it's no surprise that Expression needs to make use of ObjectFileJIT. Differential Revision: https://reviews.llvm.org/D47228 llvm-svn: 333143
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 88e5b582d3d..b6b89078491 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -53,7 +53,6 @@
#include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h"
#include "Plugins/Language/ObjC/ObjCLanguage.h"
-#include "Plugins/ObjectFile/JIT/ObjectFileJIT.h"
#include "llvm/ADT/STLExtras.h" // for make_unique
#include "llvm/Support/Compiler.h" // for LLVM_PRETT...
@@ -1652,26 +1651,6 @@ uint32_t Module::GetVersion(uint32_t *versions, uint32_t num_versions) {
return 0;
}
-ModuleSP
-Module::CreateJITModule(const lldb::ObjectFileJITDelegateSP &delegate_sp) {
- if (delegate_sp) {
- // Must create a module and place it into a shared pointer before we can
- // create an object file since it has a std::weak_ptr back to the module,
- // so we need to control the creation carefully in this static function
- ModuleSP module_sp(new Module());
- module_sp->m_objfile_sp =
- std::make_shared<ObjectFileJIT>(module_sp, delegate_sp);
- if (module_sp->m_objfile_sp) {
- // Once we get the object file, update our module with the object file's
- // architecture since it might differ in vendor/os if some parts were
- // unknown.
- module_sp->m_objfile_sp->GetArchitecture(module_sp->m_arch);
- }
- return module_sp;
- }
- return ModuleSP();
-}
-
bool Module::GetIsDynamicLinkEditor() {
ObjectFile *obj_file = GetObjectFile();
OpenPOWER on IntegriCloud