1//===- EPCGenericJITLinkMemoryManagerSPS.cpp - SPS mem manager ------------===//
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/EPCGenericJITLinkMemoryManagerSPS.h"
10
11#include "llvm/ExecutionEngine/Orc/Core.h"
12
13namespace llvm::orc::sps {
14
15Expected<std::unique_ptr<EPCGenericJITLinkMemoryManager>>
16createEPCGenericJITLinkMemoryManager(JITDylib &JD) {
17 auto B = createSimpleMemoryMapBindings(JD);
18 if (!B)
19 return B.takeError();
20 return std::make_unique<EPCGenericJITLinkMemoryManager>(
21 args&: JD.getExecutionSession(), args: std::move(*B));
22}
23
24Expected<std::unique_ptr<EPCGenericJITLinkMemoryManager>>
25createEPCGenericJITLinkMemoryManager(ExecutionSession &ES) {
26 return createEPCGenericJITLinkMemoryManager(JD&: ES.getBootstrapJITDylib());
27}
28
29} // namespace llvm::orc::sps
30