[Lldb-commits] [PATCH] D47228: Break dependency from Core to ObjectFileJIT

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue May 22 14:13:35 PDT 2018


zturner created this revision.
zturner added reviewers: labath, jingham.
Herald added a subscriber: mgorny.

This was responsible for the cycle Core > ObjectFile > Core.

The only reason this dependency 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 a jit module, I turn this into a function that can create a module for any type of object file plugin and forwards the arguments through.  Since it 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 happens to make 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`.

This change reduces the distinct cycle count from 38 to 37


https://reviews.llvm.org/D47228

Files:
  lldb/include/lldb/Core/Module.h
  lldb/source/Core/CMakeLists.txt
  lldb/source/Core/Module.cpp
  lldb/source/Expression/CMakeLists.txt
  lldb/source/Expression/IRExecutionUnit.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47228.148100.patch
Type: text/x-patch
Size: 4781 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180522/a2582788/attachment.bin>


More information about the lldb-commits mailing list