LLVM 24.0.0git
RemoteSymbolLookupSet.h
Go to the documentation of this file.
1//===- RemoteSymbolLookupSet.h - Executor-side lookup sets ------*- 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// The executor-side representation of a symbol lookup set and its result, and
10// the lookup set's SPS serialization.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REMOTESYMBOLLOOKUPSET_H
15#define LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REMOTESYMBOLLOOKUPSET_H
16
20
21#include <optional>
22#include <string>
23#include <vector>
24
25namespace llvm::orc {
26
28 std::string Name;
30};
31
32using RemoteSymbolLookupSet = std::vector<RemoteSymbolLookupSetElement>;
33
34/// The result of looking up a RemoteSymbolLookupSet: one entry per element of
35/// the set, in the same order.
36///
37/// An empty optional indicates that a required symbol was not found. A missing
38/// weakly referenced symbol is reported as a present optional holding a null
39/// address.
40using RemoteSymbolLookupResult = std::vector<std::optional<ExecutorAddr>>;
41
42namespace shared {
43
44template <>
47public:
48 static size_t size(const RemoteSymbolLookupSetElement &V) {
49 return SPSArgList<SPSString, bool>::size(V.Name, V.Required);
50 }
51
52 static size_t serialize(SPSOutputBuffer &OB,
54 return SPSArgList<SPSString, bool>::serialize(OB, V.Name, V.Required);
55 }
56
57 static size_t deserialize(SPSInputBuffer &IB,
59 return SPSArgList<SPSString, bool>::deserialize(IB, V.Name, V.Required);
60 }
61};
62
63} // namespace shared
64
65} // namespace llvm::orc
66
67#endif // LLVM_EXECUTIONENGINE_ORC_TARGETPROCESS_REMOTESYMBOLLOOKUPSET_H
A utility class for serializing to a blob from a variadic list.
Input char buffer with underflow check.
Output char buffer with overflow check.
static size_t serialize(SPSOutputBuffer &OB, const RemoteSymbolLookupSetElement &V)
Specialize to describe how to serialize/deserialize to/from the given concrete type.
SPSTuple< SPSString, bool > SPSSymbolLookupSetElement
A symbol name, and whether the symbol is required (true) or weakly referenced (false).
std::vector< RemoteSymbolLookupSetElement > RemoteSymbolLookupSet
std::vector< std::optional< ExecutorAddr > > RemoteSymbolLookupResult
The result of looking up a RemoteSymbolLookupSet: one entry per element of the set,...