#include "llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h"
#include "llvm/ExecutionEngine/JITLink/EHFrameSupport.h"
#include "llvm/ExecutionEngine/JITLink/aarch32.h"
#include "llvm/ExecutionEngine/Orc/DebugObjectManagerPlugin.h"
#include "llvm/ExecutionEngine/Orc/DebugUtils.h"
#include "llvm/ExecutionEngine/Orc/ObjectFileInterface.h"
#include "llvm/ExecutionEngine/Orc/Shared/ObjectFormats.h"
#include "llvm/Support/MemoryBuffer.h"
#include <string>
#define DEBUG_TYPE …
usingnamespacellvm;
usingnamespacellvm::jitlink;
usingnamespacellvm::orc;
namespace {
bool hasInitializerSection(jitlink::LinkGraph &G) { … }
ExecutorAddr getJITSymbolPtrForSymbol(Symbol &Sym, const Triple &TT) { … }
JITSymbolFlags getJITSymbolFlagsForSymbol(Symbol &Sym) { … }
class LinkGraphMaterializationUnit : public MaterializationUnit { … };
std::atomic<uint64_t> LinkGraphMaterializationUnit::Counter{ … };
}
namespace llvm {
namespace orc {
class ObjectLinkingLayerJITLinkContext final : public JITLinkContext { … };
ObjectLinkingLayer::Plugin::~Plugin() = default;
char ObjectLinkingLayer::ID;
BaseT;
ObjectLinkingLayer::ObjectLinkingLayer(ExecutionSession &ES)
: … { … }
ObjectLinkingLayer::ObjectLinkingLayer(ExecutionSession &ES,
JITLinkMemoryManager &MemMgr)
: … { … }
ObjectLinkingLayer::ObjectLinkingLayer(
ExecutionSession &ES, std::unique_ptr<JITLinkMemoryManager> MemMgr)
: … { … }
ObjectLinkingLayer::~ObjectLinkingLayer() { … }
Error ObjectLinkingLayer::add(ResourceTrackerSP RT,
std::unique_ptr<LinkGraph> G) { … }
void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R,
std::unique_ptr<MemoryBuffer> O) { … }
void ObjectLinkingLayer::emit(std::unique_ptr<MaterializationResponsibility> R,
std::unique_ptr<LinkGraph> G) { … }
Error ObjectLinkingLayer::recordFinalizedAlloc(
MaterializationResponsibility &MR, FinalizedAlloc FA) { … }
Error ObjectLinkingLayer::handleRemoveResources(JITDylib &JD, ResourceKey K) { … }
void ObjectLinkingLayer::handleTransferResources(JITDylib &JD,
ResourceKey DstKey,
ResourceKey SrcKey) { … }
EHFrameRegistrationPlugin::EHFrameRegistrationPlugin(
ExecutionSession &ES, std::unique_ptr<EHFrameRegistrar> Registrar)
: … { … }
void EHFrameRegistrationPlugin::modifyPassConfig(
MaterializationResponsibility &MR, LinkGraph &G,
PassConfiguration &PassConfig) { … }
Error EHFrameRegistrationPlugin::notifyEmitted(
MaterializationResponsibility &MR) { … }
Error EHFrameRegistrationPlugin::notifyFailed(
MaterializationResponsibility &MR) { … }
Error EHFrameRegistrationPlugin::notifyRemovingResources(JITDylib &JD,
ResourceKey K) { … }
void EHFrameRegistrationPlugin::notifyTransferringResources(
JITDylib &JD, ResourceKey DstKey, ResourceKey SrcKey) { … }
}
}