[ORC] Enable use of TargetProcessControl::getMemMgr with ObjectLinkingLayer.
authorLang Hames <lhames@gmail.com>
Thu, 23 Jul 2020 23:03:45 +0000 (16:03 -0700)
committerLang Hames <lhames@gmail.com>
Thu, 23 Jul 2020 23:18:57 +0000 (16:18 -0700)
commit69091eb1c40a5b5ebd7c8a9fc9720a1b4797e79e
treeea03dc541cb7459a8da56d41e5acd23ba1c12a2b
parent96551c9cad71b8a30593412557e2847179c6d3e8
[ORC] Enable use of TargetProcessControl::getMemMgr with ObjectLinkingLayer.

This patch makes ownership of the JITLinkMemoryManager by ObjectLinkingLayer
optional: the layer can still own the memory manager but no longer has to.

Evevntually we want to move to a state where ObjectLinkingLayer never owns its
memory manager. For now allowing optional ownership makes it easier to develop
classes that can dynamically use either RTDyldObjectLinkingLayer, which owns
its memory managers, or ObjectLinkingLayer (e.g. LLJIT).
llvm/examples/OrcV2Examples/LLJITWithTargetProcessControl/LLJITWithTargetProcessControl.cpp
llvm/include/llvm/ExecutionEngine/Orc/LLJIT.h
llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp