LLVM  14.0.0git
llvm::JITSymbolResolver Class Referenceabstract

Symbol resolution interface. More...

#include "llvm/ExecutionEngine/JITSymbol.h"

Inheritance diagram for llvm::JITSymbolResolver:
[legend]

Public Types

using LookupSet = std::set< StringRef >

using LookupResult = std::map< StringRef, JITEvaluatedSymbol >

using OnResolvedFunction = unique_function< void(Expected< LookupResult >)>

Public Member Functions

virtual ~JITSymbolResolver ()=default

virtual void lookup (const LookupSet &Symbols, OnResolvedFunction OnResolved)=0
Returns the fully resolved address and flags for each of the given symbols. More...

virtual Expected< LookupSetgetResponsibilitySet (const LookupSet &Symbols)=0
Returns the subset of the given symbols that should be materialized by the caller. More...

virtual bool allowsZeroSymbols ()
Specify if this resolver can return valid symbols with zero value. More...

Detailed Description

Symbol resolution interface.

Allows symbol flags and addresses to be looked up by name. Symbol queries are done in bulk (i.e. you request resolution of a set of symbols, rather than a single one) to reduce IPC overhead in the case of remote JITing, and expose opportunities for parallel compilation.

Definition at line 371 of file JITSymbol.h.

◆ LookupResult

 using llvm::JITSymbolResolver::LookupResult = std::map

Definition at line 374 of file JITSymbol.h.

◆ LookupSet

Definition at line 373 of file JITSymbol.h.

◆ OnResolvedFunction

 using llvm::JITSymbolResolver::OnResolvedFunction = unique_function)>

Definition at line 375 of file JITSymbol.h.

◆ ~JITSymbolResolver()

 virtual llvm::JITSymbolResolver::~JITSymbolResolver ( )
virtualdefault

◆ allowsZeroSymbols()

 virtual bool llvm::JITSymbolResolver::allowsZeroSymbols ( )
inlinevirtual

Specify if this resolver can return valid symbols with zero value.

Definition at line 394 of file JITSymbol.h.

◆ getResponsibilitySet()

 virtual Expected llvm::JITSymbolResolver::getResponsibilitySet ( const LookupSet & Symbols )
pure virtual

Returns the subset of the given symbols that should be materialized by the caller.

Only weak/common symbols should be looked up, as strong definitions are implicitly always part of the caller's responsibility.

Implemented in llvm::LegacyJITSymbolResolver.

◆ lookup()

 virtual void llvm::JITSymbolResolver::lookup ( const LookupSet & Symbols, OnResolvedFunction OnResolved )
pure virtual

Returns the fully resolved address and flags for each of the given symbols.

This method will return an error if any of the given symbols can not be resolved, or if the resolution process itself triggers an error.

Implemented in llvm::LegacyJITSymbolResolver.

The documentation for this class was generated from the following files: