diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink')
9 files changed, 185 insertions, 185 deletions
diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h index 2e5bb609fe..fa8859133e 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/EHFrameSupport.h @@ -42,10 +42,10 @@ public: class InProcessEHFrameRegistrar final : public EHFrameRegistrar { public: Error registerEHFrames(JITTargetAddress EHFrameSectionAddr, - size_t EHFrameSectionSize) override; + size_t EHFrameSectionSize) override; Error deregisterEHFrames(JITTargetAddress EHFrameSectionAddr, - size_t EHFrameSectionSize) override; + size_t EHFrameSectionSize) override; }; using StoreFrameRangeFunction = diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF.h index 4a042fbd49..a2144ab1dd 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF.h @@ -26,20 +26,20 @@ namespace llvm { namespace jitlink { -/// Create a LinkGraph from an ELF relocatable object. -/// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromELFObject(MemoryBufferRef ObjectBuffer); - -/// Link the given graph. +/// Create a LinkGraph from an ELF relocatable object. /// +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromELFObject(MemoryBufferRef ObjectBuffer); + +/// Link the given graph. +/// /// Uses conservative defaults for GOT and stub handling based on the target /// platform. -void link_ELF(std::unique_ptr<LinkGraph> G, - std::unique_ptr<JITLinkContext> Ctx); +void link_ELF(std::unique_ptr<LinkGraph> G, + std::unique_ptr<JITLinkContext> Ctx); } // end namespace jitlink } // end namespace llvm diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h index de62f02876..2c2d8ba8e9 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h @@ -51,20 +51,20 @@ enum ELFX86RelocationKind : Edge::Kind { } // end namespace ELF_x86_64_Edges -/// Create a LinkGraph from an ELF/x86-64 relocatable object. -/// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromELFObject_x86_64(MemoryBufferRef ObjectBuffer); - +/// Create a LinkGraph from an ELF/x86-64 relocatable object. +/// +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromELFObject_x86_64(MemoryBufferRef ObjectBuffer); + /// jit-link the given object buffer, which must be a ELF x86-64 object file. -void link_ELF_x86_64(std::unique_ptr<LinkGraph> G, - std::unique_ptr<JITLinkContext> Ctx); - -/// Return the string name of the given ELF x86-64 edge kind. -StringRef getELFX86RelocationKindName(Edge::Kind R); +void link_ELF_x86_64(std::unique_ptr<LinkGraph> G, + std::unique_ptr<JITLinkContext> Ctx); + +/// Return the string name of the given ELF x86-64 edge kind. +StringRef getELFX86RelocationKindName(Edge::Kind R); } // end namespace jitlink } // end namespace llvm diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLink.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLink.h index 43d567880a..e464ede4e5 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLink.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLink.h @@ -402,10 +402,10 @@ public: return Name; } - /// Rename this symbol. The client is responsible for updating scope and - /// linkage if this name-change requires it. - void setName(StringRef Name) { this->Name = Name; } - + /// Rename this symbol. The client is responsible for updating scope and + /// linkage if this name-change requires it. + void setName(StringRef Name) { this->Name = Name; } + /// Returns true if this Symbol has content (potentially) defined within this /// object file (i.e. is anything but an external or absolute symbol). bool isDefined() const { @@ -793,48 +793,48 @@ public: Section::const_block_iterator, const Block *, getSectionConstBlocks>; - LinkGraph(std::string Name, const Triple &TT, unsigned PointerSize, + LinkGraph(std::string Name, const Triple &TT, unsigned PointerSize, support::endianness Endianness) - : Name(std::move(Name)), TT(TT), PointerSize(PointerSize), + : Name(std::move(Name)), TT(TT), PointerSize(PointerSize), Endianness(Endianness) {} /// Returns the name of this graph (usually the name of the original /// underlying MemoryBuffer). const std::string &getName() { return Name; } - /// Returns the target triple for this Graph. - const Triple &getTargetTriple() const { return TT; } - + /// Returns the target triple for this Graph. + const Triple &getTargetTriple() const { return TT; } + /// Returns the pointer size for use in this graph. unsigned getPointerSize() const { return PointerSize; } /// Returns the endianness of content in this graph. support::endianness getEndianness() const { return Endianness; } - /// Allocate a copy of the given string using the LinkGraph's allocator. - /// This can be useful when renaming symbols or adding new content to the - /// graph. - StringRef allocateString(StringRef Source) { - auto *AllocatedBuffer = Allocator.Allocate<char>(Source.size()); - llvm::copy(Source, AllocatedBuffer); - return StringRef(AllocatedBuffer, Source.size()); - } - - /// Allocate a copy of the given string using the LinkGraph's allocator. - /// This can be useful when renaming symbols or adding new content to the - /// graph. - /// - /// Note: This Twine-based overload requires an extra string copy and an - /// extra heap allocation for large strings. The StringRef overload should - /// be preferred where possible. - StringRef allocateString(Twine Source) { - SmallString<256> TmpBuffer; - auto SourceStr = Source.toStringRef(TmpBuffer); - auto *AllocatedBuffer = Allocator.Allocate<char>(SourceStr.size()); - llvm::copy(SourceStr, AllocatedBuffer); - return StringRef(AllocatedBuffer, SourceStr.size()); - } - + /// Allocate a copy of the given string using the LinkGraph's allocator. + /// This can be useful when renaming symbols or adding new content to the + /// graph. + StringRef allocateString(StringRef Source) { + auto *AllocatedBuffer = Allocator.Allocate<char>(Source.size()); + llvm::copy(Source, AllocatedBuffer); + return StringRef(AllocatedBuffer, Source.size()); + } + + /// Allocate a copy of the given string using the LinkGraph's allocator. + /// This can be useful when renaming symbols or adding new content to the + /// graph. + /// + /// Note: This Twine-based overload requires an extra string copy and an + /// extra heap allocation for large strings. The StringRef overload should + /// be preferred where possible. + StringRef allocateString(Twine Source) { + SmallString<256> TmpBuffer; + auto SourceStr = Source.toStringRef(TmpBuffer); + auto *AllocatedBuffer = Allocator.Allocate<char>(SourceStr.size()); + llvm::copy(SourceStr, AllocatedBuffer); + return StringRef(AllocatedBuffer, SourceStr.size()); + } + /// Create a section with the given name, protection flags, and alignment. Section &createSection(StringRef Name, sys::Memory::ProtectionFlags Prot) { std::unique_ptr<Section> Sec(new Section(Name, Prot, Sections.size())); @@ -997,7 +997,7 @@ public: Section &Sec = Sym.getBlock().getSection(); Sec.removeSymbol(Sym); } - Sym.makeExternal(createAddressable(0, false)); + Sym.makeExternal(createAddressable(0, false)); ExternalSymbols.insert(&Sym); } @@ -1057,7 +1057,7 @@ private: BumpPtrAllocator Allocator; std::string Name; - Triple TT; + Triple TT; unsigned PointerSize; support::endianness Endianness; SectionList Sections; @@ -1230,31 +1230,31 @@ struct PassConfiguration { /// Notable use cases: Building GOT, stub, and TLV symbols. LinkGraphPassList PostPrunePasses; - /// Post-allocation passes. - /// - /// These passes are called on the graph after memory has been allocated and - /// defined nodes have been assigned their final addresses, but before the - /// context has been notified of these addresses. At this point externals - /// have not been resolved, and symbol content has not yet been copied into - /// working memory. - /// - /// Notable use cases: Setting up data structures associated with addresses - /// of defined symbols (e.g. a mapping of __dso_handle to JITDylib* for the - /// JIT runtime) -- using a PostAllocationPass for this ensures that the - /// data structures are in-place before any query for resolved symbols - /// can complete. - LinkGraphPassList PostAllocationPasses; - + /// Post-allocation passes. + /// + /// These passes are called on the graph after memory has been allocated and + /// defined nodes have been assigned their final addresses, but before the + /// context has been notified of these addresses. At this point externals + /// have not been resolved, and symbol content has not yet been copied into + /// working memory. + /// + /// Notable use cases: Setting up data structures associated with addresses + /// of defined symbols (e.g. a mapping of __dso_handle to JITDylib* for the + /// JIT runtime) -- using a PostAllocationPass for this ensures that the + /// data structures are in-place before any query for resolved symbols + /// can complete. + LinkGraphPassList PostAllocationPasses; + /// Pre-fixup passes. /// /// These passes are called on the graph after memory has been allocated, - /// content copied into working memory, and all nodes (including externals) - /// have been assigned their final addresses, but before any fixups have been - /// applied. + /// content copied into working memory, and all nodes (including externals) + /// have been assigned their final addresses, but before any fixups have been + /// applied. /// /// Notable use cases: Late link-time optimizations like GOT and stub /// elimination. - LinkGraphPassList PreFixupPasses; + LinkGraphPassList PreFixupPasses; /// Post-fixup passes. /// @@ -1310,15 +1310,15 @@ class JITLinkContext { public: using LookupMap = DenseMap<StringRef, SymbolLookupFlags>; - /// Create a JITLinkContext. - JITLinkContext(const JITLinkDylib *JD) : JD(JD) {} - + /// Create a JITLinkContext. + JITLinkContext(const JITLinkDylib *JD) : JD(JD) {} + /// Destroy a JITLinkContext. virtual ~JITLinkContext(); - /// Return the JITLinkDylib that this link is targeting, if any. - const JITLinkDylib *getJITLinkDylib() const { return JD; } - + /// Return the JITLinkDylib that this link is targeting, if any. + const JITLinkDylib *getJITLinkDylib() const { return JD; } + /// Return the MemoryManager to be used for this link. virtual JITLinkMemoryManager &getMemoryManager() = 0; @@ -1336,11 +1336,11 @@ public: /// their final memory locations in the target process. At this point the /// LinkGraph can be inspected to build a symbol table, however the block /// content will not generally have been copied to the target location yet. - /// - /// If the client detects an error in the LinkGraph state (e.g. unexpected or - /// missing symbols) they may return an error here. The error will be - /// propagated to notifyFailed and the linker will bail out. - virtual Error notifyResolved(LinkGraph &G) = 0; + /// + /// If the client detects an error in the LinkGraph state (e.g. unexpected or + /// missing symbols) they may return an error here. The error will be + /// propagated to notifyFailed and the linker will bail out. + virtual Error notifyResolved(LinkGraph &G) = 0; /// Called by JITLink to notify the context that the object has been /// finalized (i.e. emitted to memory and memory permissions set). If all of @@ -1366,26 +1366,26 @@ public: /// Called by JITLink to modify the pass pipeline prior to linking. /// The default version performs no modification. virtual Error modifyPassConfig(const Triple &TT, PassConfiguration &Config); - -private: - const JITLinkDylib *JD = nullptr; + +private: + const JITLinkDylib *JD = nullptr; }; /// Marks all symbols in a graph live. This can be used as a default, /// conservative mark-live implementation. Error markAllSymbolsLive(LinkGraph &G); -/// Create a LinkGraph from the given object buffer. +/// Create a LinkGraph from the given object buffer. /// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromObject(MemoryBufferRef ObjectBuffer); - -/// Link the given graph. -void link(std::unique_ptr<LinkGraph> G, std::unique_ptr<JITLinkContext> Ctx); - +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromObject(MemoryBufferRef ObjectBuffer); + +/// Link the given graph. +void link(std::unique_ptr<LinkGraph> G, std::unique_ptr<JITLinkContext> Ctx); + } // end namespace jitlink } // end namespace llvm diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkDylib.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkDylib.h index bd04937b1f..f6e94e909b 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkDylib.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkDylib.h @@ -1,35 +1,35 @@ -#pragma once - -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wunused-parameter" -#endif - -//===-- JITLinkDylib.h - JITLink Dylib type ---------------------*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// Defines the JITLinkDylib API. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H -#define LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H - -namespace llvm { -namespace jitlink { - -class JITLinkDylib {}; - -} // end namespace jitlink -} // end namespace llvm - -#endif // LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H - -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif +#pragma once + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-parameter" +#endif + +//===-- JITLinkDylib.h - JITLink Dylib type ---------------------*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// Defines the JITLinkDylib API. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H +#define LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H + +namespace llvm { +namespace jitlink { + +class JITLinkDylib {}; + +} // end namespace jitlink +} // end namespace llvm + +#endif // LLVM_EXECUTIONENGINE_JITLINK_JITLINKDYLIB_H + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h index 0cf8555b15..0d5269ddec 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/JITLinkMemoryManager.h @@ -21,10 +21,10 @@ #define LLVM_EXECUTIONENGINE_JITLINK_JITLINKMEMORYMANAGER_H #include "llvm/ADT/DenseMap.h" -#include "llvm/ExecutionEngine/JITLink/JITLinkDylib.h" +#include "llvm/ExecutionEngine/JITLink/JITLinkDylib.h" #include "llvm/ExecutionEngine/JITSymbol.h" #include "llvm/Support/Error.h" -#include "llvm/Support/MSVCErrorWorkarounds.h" +#include "llvm/Support/MSVCErrorWorkarounds.h" #include "llvm/Support/Memory.h" #include <cstdint> @@ -101,31 +101,31 @@ public: virtual ~JITLinkMemoryManager(); /// Create an Allocation object. - /// - /// The JD argument represents the target JITLinkDylib, and can be used by - /// JITLinkMemoryManager implementers to manage per-dylib allocation pools - /// (e.g. one pre-reserved address space slab per dylib to ensure that all - /// allocations for the dylib are within a certain range). The JD argument - /// may be null (representing an allocation not associated with any - /// JITDylib. - /// - /// The request argument describes the segment sizes and permisssions being - /// requested. + /// + /// The JD argument represents the target JITLinkDylib, and can be used by + /// JITLinkMemoryManager implementers to manage per-dylib allocation pools + /// (e.g. one pre-reserved address space slab per dylib to ensure that all + /// allocations for the dylib are within a certain range). The JD argument + /// may be null (representing an allocation not associated with any + /// JITDylib. + /// + /// The request argument describes the segment sizes and permisssions being + /// requested. virtual Expected<std::unique_ptr<Allocation>> - allocate(const JITLinkDylib *JD, const SegmentsRequestMap &Request) = 0; + allocate(const JITLinkDylib *JD, const SegmentsRequestMap &Request) = 0; }; /// A JITLinkMemoryManager that allocates in-process memory. class InProcessMemoryManager : public JITLinkMemoryManager { public: Expected<std::unique_ptr<Allocation>> - allocate(const JITLinkDylib *JD, const SegmentsRequestMap &Request) override; + allocate(const JITLinkDylib *JD, const SegmentsRequestMap &Request) override; }; } // end namespace jitlink } // end namespace llvm -#endif // LLVM_EXECUTIONENGINE_JITLINK_JITLINKMEMORYMANAGER_H +#endif // LLVM_EXECUTIONENGINE_JITLINK_JITLINKMEMORYMANAGER_H #ifdef __GNUC__ #pragma GCC diagnostic pop diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO.h index c73d7b9111..97085a6fa3 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO.h @@ -25,20 +25,20 @@ namespace llvm { namespace jitlink { -/// Create a LinkGraph from a MachO relocatable object. -/// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromMachOObject(MemoryBufferRef ObjectBuffer); - +/// Create a LinkGraph from a MachO relocatable object. +/// +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromMachOObject(MemoryBufferRef ObjectBuffer); + /// jit-link the given ObjBuffer, which must be a MachO object file. /// /// Uses conservative defaults for GOT and stub handling based on the target /// platform. -void link_MachO(std::unique_ptr<LinkGraph> G, - std::unique_ptr<JITLinkContext> Ctx); +void link_MachO(std::unique_ptr<LinkGraph> G, + std::unique_ptr<JITLinkContext> Ctx); } // end namespace jitlink } // end namespace llvm diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h index e611fb78e4..f374e62feb 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h @@ -47,14 +47,14 @@ enum MachOARM64RelocationKind : Edge::Kind { } // namespace MachO_arm64_Edges -/// Create a LinkGraph from a MachO/arm64 relocatable object. -/// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromMachOObject_arm64(MemoryBufferRef ObjectBuffer); - +/// Create a LinkGraph from a MachO/arm64 relocatable object. +/// +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromMachOObject_arm64(MemoryBufferRef ObjectBuffer); + /// jit-link the given object buffer, which must be a MachO arm64 object file. /// /// If PrePrunePasses is empty then a default mark-live pass will be inserted @@ -64,8 +64,8 @@ createLinkGraphFromMachOObject_arm64(MemoryBufferRef ObjectBuffer); /// If PostPrunePasses is empty then a default GOT-and-stubs insertion pass will /// be inserted. If PostPrunePasses is not empty then the caller is responsible /// for including a pass to insert GOT and stub edges. -void link_MachO_arm64(std::unique_ptr<LinkGraph> G, - std::unique_ptr<JITLinkContext> Ctx); +void link_MachO_arm64(std::unique_ptr<LinkGraph> G, + std::unique_ptr<JITLinkContext> Ctx); /// Return the string name of the given MachO arm64 edge kind. StringRef getMachOARM64RelocationKindName(Edge::Kind R); diff --git a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h index 2edeb6869c..f3647c6497 100644 --- a/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h +++ b/contrib/libs/llvm12/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h @@ -52,16 +52,16 @@ enum MachOX86RelocationKind : Edge::Kind { } // namespace MachO_x86_64_Edges -/// Create a LinkGraph from a MachO/x86-64 relocatable object. -/// -/// Note: The graph does not take ownership of the underlying buffer, nor copy -/// its contents. The caller is responsible for ensuring that the object buffer -/// outlives the graph. -Expected<std::unique_ptr<LinkGraph>> -createLinkGraphFromMachOObject_x86_64(MemoryBufferRef ObjectBuffer); - -/// jit-link the given LinkGraph. +/// Create a LinkGraph from a MachO/x86-64 relocatable object. /// +/// Note: The graph does not take ownership of the underlying buffer, nor copy +/// its contents. The caller is responsible for ensuring that the object buffer +/// outlives the graph. +Expected<std::unique_ptr<LinkGraph>> +createLinkGraphFromMachOObject_x86_64(MemoryBufferRef ObjectBuffer); + +/// jit-link the given LinkGraph. +/// /// If PrePrunePasses is empty then a default mark-live pass will be inserted /// that will mark all exported atoms live. If PrePrunePasses is not empty, the /// caller is responsible for including a pass to mark atoms as live. @@ -69,8 +69,8 @@ createLinkGraphFromMachOObject_x86_64(MemoryBufferRef ObjectBuffer); /// If PostPrunePasses is empty then a default GOT-and-stubs insertion pass will /// be inserted. If PostPrunePasses is not empty then the caller is responsible /// for including a pass to insert GOT and stub edges. -void link_MachO_x86_64(std::unique_ptr<LinkGraph> G, - std::unique_ptr<JITLinkContext> Ctx); +void link_MachO_x86_64(std::unique_ptr<LinkGraph> G, + std::unique_ptr<JITLinkContext> Ctx); /// Return the string name of the given MachO x86-64 edge kind. StringRef getMachOX86RelocationKindName(Edge::Kind R); |