1//===------- EPCGenericDylibManager.cpp -- Dylib management via EPC -------===//
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#include "llvm/ExecutionEngine/Orc/EPCGenericDylibManager.h"
10
11namespace llvm {
12namespace orc {
13
14Expected<tpctypes::DylibHandle> EPCGenericDylibManager::open(StringRef Path,
15 uint64_t Mode) {
16 return B.Open(ES, B.Instance, Path, Mode);
17}
18
19void EPCGenericDylibManager::lookupAsync(tpctypes::DylibHandle H,
20 const SymbolLookupSet &Lookup,
21 SymbolLookupCompleteFn Complete) {
22 B.Resolve(std::move(Complete), ES, B.Instance, H, Lookup);
23}
24
25Expected<tpctypes::DylibHandle>
26EPCGenericDylibManager::loadDylib(const char *DylibPath) {
27 return open(Path: DylibPath, Mode: 0);
28}
29
30void EPCGenericDylibManager::lookupSymbolsAsync(
31 tpctypes::DylibHandle H, const SymbolLookupSet &Symbols,
32 DylibManager::SymbolLookupCompleteFn Complete) {
33 lookupAsync(H, Lookup: Symbols, Complete: std::move(Complete));
34}
35
36} // end namespace orc
37} // end namespace llvm
38