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