LLVM 24.0.0git
InstanceSymbolGenerator.h
Go to the documentation of this file.
1//===---- InstanceSymbolGenerator.h - Executor instance symbols -*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// A definition generator for the executor's instance symbols.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_EXECUTIONENGINE_ORC_INSTANCESYMBOLGENERATOR_H
14#define LLVM_EXECUTIONENGINE_ORC_INSTANCESYMBOLGENERATOR_H
15
19
20namespace llvm::orc {
21
22/// A DefinitionGenerator that generates symbols by looking them up in the ORC
23/// runtime Session's instance symbols (via a Proxy).
24///
25/// Instance symbols are names that the ORC runtime gives to objects created at
26/// runtime, which have no symbols under the standard object models.
28public:
30
31 InstanceSymbolGenerator(LookupProxy Lookup) : Lookup(std::move(Lookup)) {}
32
33 Error tryToGenerate(LookupState &LS, LookupKind K, JITDylib &JD,
34 JITDylibLookupFlags JDLookupFlags,
35 const SymbolLookupSet &Symbols) override;
36
37private:
38 LookupProxy Lookup;
39};
40
41} // namespace llvm::orc
42
43#endif // LLVM_EXECUTIONENGINE_ORC_INSTANCESYMBOLGENERATOR_H
#define LLVM_ABI
Definition Compiler.h:215
static int Lookup(ArrayRef< TableEntry > Table, unsigned Opcode)
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Definition generators can be attached to JITDylibs to generate new definitions for otherwise unresolv...
Definition Core.h:633
Proxy< SymbolLookupResult(SymbolLookupSet)> LookupProxy
Represents a JIT'd dynamic library.
Definition Core.h:676
Wraps state for a lookup-in-progress.
Definition Core.h:608
A set of symbols to look up, each associated with a SymbolLookupFlags value.
std::vector< std::optional< ExecutorAddr > > SymbolLookupResult
The result of looking up a SymbolLookupSet in the executor: one entry per element of the set,...
JITDylibLookupFlags
Lookup flags that apply to each dylib in the search order for a lookup.
Definition Core.h:133
LookupKind
Describes the kind of lookup being performed.
Definition Core.h:145
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Definition STLExtras.h:1933
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:878