[Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy
authorStefan Gränitz <stefan.graenitz@gmail.com>
Fri, 26 Feb 2021 12:11:57 +0000 (13:11 +0100)
committerStefan Gränitz <stefan.graenitz@gmail.com>
Fri, 26 Feb 2021 12:13:05 +0000 (13:13 +0100)
commit406ef36b03f911014018ba7ee1d3259567b14575
treef92ff5bcce4c0f4a9de9fb0f11fdbbd137aa5fa6
parent7ac4c956afa2587cf19c96993a6cfa693a6de532
[Orc] Use extensible RTTI for the orc::ObjectLayer class hierarchy

So far we had no way to distinguish between JITLink and RuntimeDyld in lli. Instead, we used implicit knowledge that RuntimeDyld would be used for linking ELF. In order to get D97337 to work with lli though, we have to move on and allow JITLink for ELF. This patch uses extensible RTTI to allow external clients to add their own layers without touching the LLVM sources.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D97338
llvm/include/llvm/ExecutionEngine/Orc/Layer.h
llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
llvm/lib/ExecutionEngine/Orc/Layer.cpp
llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp
llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
llvm/tools/lli/lli.cpp