diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h')
-rw-r--r-- | contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h index 0c16ece95a..f9aa582b31 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h @@ -42,7 +42,7 @@ namespace llvm { namespace jitlink { class EHFrameRegistrar; -class LinkGraph; +class LinkGraph; class Symbol; } // namespace jitlink @@ -59,7 +59,7 @@ class ObjectLinkingLayerJITLinkContext; /// Clients can use this class to add relocatable object files to an /// ExecutionSession, and it typically serves as the base layer (underneath /// a compiling layer like IRCompileLayer) for the rest of the JIT. -class ObjectLinkingLayer : public ObjectLayer, private ResourceManager { +class ObjectLinkingLayer : public ObjectLayer, private ResourceManager { friend class ObjectLinkingLayerJITLinkContext; public: @@ -80,10 +80,10 @@ public: virtual Error notifyEmitted(MaterializationResponsibility &MR) { return Error::success(); } - virtual Error notifyFailed(MaterializationResponsibility &MR) = 0; - virtual Error notifyRemovingResources(ResourceKey K) = 0; - virtual void notifyTransferringResources(ResourceKey DstKey, - ResourceKey SrcKey) = 0; + virtual Error notifyFailed(MaterializationResponsibility &MR) = 0; + virtual Error notifyRemovingResources(ResourceKey K) = 0; + virtual void notifyTransferringResources(ResourceKey DstKey, + ResourceKey SrcKey) = 0; /// Return any dependencies that synthetic symbols (e.g. init symbols) /// have on locally scoped jitlink::Symbols. This is used by the @@ -98,15 +98,15 @@ public: using ReturnObjectBufferFunction = std::function<void(std::unique_ptr<MemoryBuffer>)>; - /// Construct an ObjectLinkingLayer. + /// Construct an ObjectLinkingLayer. + ObjectLinkingLayer(ExecutionSession &ES, + jitlink::JITLinkMemoryManager &MemMgr); + + /// Construct an ObjectLinkingLayer. Takes ownership of the given + /// JITLinkMemoryManager. This method is a temporary hack to simplify + /// co-existence with RTDyldObjectLinkingLayer (which also owns its + /// allocators). ObjectLinkingLayer(ExecutionSession &ES, - jitlink::JITLinkMemoryManager &MemMgr); - - /// Construct an ObjectLinkingLayer. Takes ownership of the given - /// JITLinkMemoryManager. This method is a temporary hack to simplify - /// co-existence with RTDyldObjectLinkingLayer (which also owns its - /// allocators). - ObjectLinkingLayer(ExecutionSession &ES, std::unique_ptr<jitlink::JITLinkMemoryManager> MemMgr); /// Destruct an ObjectLinkingLayer. @@ -126,14 +126,14 @@ public: return *this; } - /// Emit an object file. - void emit(std::unique_ptr<MaterializationResponsibility> R, + /// Emit an object file. + void emit(std::unique_ptr<MaterializationResponsibility> R, std::unique_ptr<MemoryBuffer> O) override; - /// Emit a LinkGraph. - void emit(std::unique_ptr<MaterializationResponsibility> R, - std::unique_ptr<jitlink::LinkGraph> G); - + /// Emit a LinkGraph. + void emit(std::unique_ptr<MaterializationResponsibility> R, + std::unique_ptr<jitlink::LinkGraph> G); + /// Instructs this ObjectLinkingLayer instance to override the symbol flags /// found in the AtomGraph with the flags supplied by the /// MaterializationResponsibility instance. This is a workaround to support @@ -173,31 +173,31 @@ private: void notifyLoaded(MaterializationResponsibility &MR); Error notifyEmitted(MaterializationResponsibility &MR, AllocPtr Alloc); - Error handleRemoveResources(ResourceKey K) override; - void handleTransferResources(ResourceKey DstKey, ResourceKey SrcKey) override; + Error handleRemoveResources(ResourceKey K) override; + void handleTransferResources(ResourceKey DstKey, ResourceKey SrcKey) override; mutable std::mutex LayerMutex; - jitlink::JITLinkMemoryManager &MemMgr; - std::unique_ptr<jitlink::JITLinkMemoryManager> MemMgrOwnership; + jitlink::JITLinkMemoryManager &MemMgr; + std::unique_ptr<jitlink::JITLinkMemoryManager> MemMgrOwnership; bool OverrideObjectFlags = false; bool AutoClaimObjectSymbols = false; ReturnObjectBufferFunction ReturnObjectBuffer; - DenseMap<ResourceKey, std::vector<AllocPtr>> Allocs; + DenseMap<ResourceKey, std::vector<AllocPtr>> Allocs; std::vector<std::unique_ptr<Plugin>> Plugins; }; class EHFrameRegistrationPlugin : public ObjectLinkingLayer::Plugin { public: - EHFrameRegistrationPlugin( - ExecutionSession &ES, - std::unique_ptr<jitlink::EHFrameRegistrar> Registrar); + EHFrameRegistrationPlugin( + ExecutionSession &ES, + std::unique_ptr<jitlink::EHFrameRegistrar> Registrar); void modifyPassConfig(MaterializationResponsibility &MR, const Triple &TT, jitlink::PassConfiguration &PassConfig) override; - Error notifyEmitted(MaterializationResponsibility &MR) override; - Error notifyFailed(MaterializationResponsibility &MR) override; - Error notifyRemovingResources(ResourceKey K) override; - void notifyTransferringResources(ResourceKey DstKey, - ResourceKey SrcKey) override; + Error notifyEmitted(MaterializationResponsibility &MR) override; + Error notifyFailed(MaterializationResponsibility &MR) override; + Error notifyRemovingResources(ResourceKey K) override; + void notifyTransferringResources(ResourceKey DstKey, + ResourceKey SrcKey) override; private: @@ -207,10 +207,10 @@ private: }; std::mutex EHFramePluginMutex; - ExecutionSession &ES; - std::unique_ptr<jitlink::EHFrameRegistrar> Registrar; + ExecutionSession &ES; + std::unique_ptr<jitlink::EHFrameRegistrar> Registrar; DenseMap<MaterializationResponsibility *, EHFrameRange> InProcessLinks; - DenseMap<ResourceKey, std::vector<EHFrameRange>> EHFrameRanges; + DenseMap<ResourceKey, std::vector<EHFrameRange>> EHFrameRanges; }; } // end namespace orc |