LLVM: include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_EXECUTIONENGINE_ORC_JITLINKREDIRECABLESYMBOLMANAGER_H

14#define LLVM_EXECUTIONENGINE_ORC_JITLINKREDIRECABLESYMBOLMANAGER_H

15

20

21#include

22

23namespace llvm {

24namespace orc {

25

28public:

29

33 ObjLinkingLayer.getExecutionSession().getTargetTriple()));

35 ObjLinkingLayer.getExecutionSession().getTargetTriple()));

36 if (!AnonymousPtrCreator || !PtrJumpStubCreator)

39 return std::unique_ptr(

41 ObjLinkingLayer, AnonymousPtrCreator, PtrJumpStubCreator));

42 }

43

48 : ObjLinkingLayer(ObjLinkingLayer),

49 AnonymousPtrCreator(std::move(AnonymousPtrCreator)),

50 PtrJumpStubCreator(std::move(PtrJumpStubCreator)) {}

51

53

54 void emitRedirectableSymbols(std::unique_ptr R,

56

58

59private:

63 std::atomic_size_t StubGraphIdx{0};

64};

65

66}

67}

68

69#endif

Lightweight error class with error context and mandatory checking.

Tagged union holding either a T or a Error.

Represents a JIT'd dynamic library.

ObjectLinkingLayer & getObjectLinkingLayer() const

Definition JITLinkRedirectableSymbolManager.h:52

static Expected< std::unique_ptr< RedirectableSymbolManager > > Create(ObjectLinkingLayer &ObjLinkingLayer)

Create redirection manager that uses JITLink based implementaion.

Definition JITLinkRedirectableSymbolManager.h:31

JITLinkRedirectableSymbolManager(ObjectLinkingLayer &ObjLinkingLayer, jitlink::AnonymousPointerCreator &AnonymousPtrCreator, jitlink::PointerJumpStubCreator &PtrJumpStubCreator)

Definition JITLinkRedirectableSymbolManager.h:44

An ObjectLayer implementation built on JITLink.

Base class for managing redirectable symbols in which a call gets redirected to another symbol in run...

LLVM_ABI PointerJumpStubCreator getPointerJumpStubCreator(const Triple &TT)

Get target-specific PointerJumpStubCreator.

unique_function< Symbol &( LinkGraph &G, Section &StubSection, Symbol &PointerSymbol)> PointerJumpStubCreator

Create a jump stub that jumps via the pointer at the given symbol and an anonymous symbol pointing to...

unique_function< Symbol &(LinkGraph &G, Section &PointerSection, Symbol *InitialTarget, uint64_t InitialAddend)> AnonymousPointerCreator

Creates a new pointer block in the given section and returns an Anonymous symbol pointing to it.

LLVM_ABI AnonymousPointerCreator getAnonymousPointerCreator(const Triple &TT)

Get target-specific AnonymousPointerCreator.

DenseMap< SymbolStringPtr, ExecutorSymbolDef > SymbolMap

A map from symbol names (as SymbolStringPtrs) to JITSymbols (address/flags pairs).

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI std::error_code inconvertibleErrorCode()

The value returned by this function can be returned from convertToErrorCode for Error values where no...

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

Implement std::hash so that hash_code can be used in STL containers.