[ORC] Add MachOPlatform::Create overload -- Pass ORC runtime as def generator.
authorLang Hames <lhames@gmail.com>
Sun, 12 Feb 2023 20:34:20 +0000 (12:34 -0800)
committerLang Hames <lhames@gmail.com>
Sun, 12 Feb 2023 21:30:37 +0000 (13:30 -0800)
commitbe2fc577c38921c95811715a1ba1b3a149ba5e73
tree2d5b11b05a9bcf6347546800dd63e9c0afcb30d5
parentaca9016bcde040ea03512ee1e23f61f08b3b07b9
[ORC] Add MachOPlatform::Create overload -- Pass ORC runtime as def generator.

The existing Create method took a path to the ORC runtime and created a
StaticLibraryDefinitionGenerator for it. The new overload takes a
std::unique_ptr<DefinitionGenerator> directly instead. This provides more
flexibility when constructing MachOPlatforms. E.g. The runtime archive can be
embedded in a special section in the ORC controller executable or library,
rather than being on-disk.
llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp