LLVM 22.0.0git
RedirectionManager.cpp
Go to the documentation of this file.
1//===---- RedirectionManager.cpp - Redirection manager interface in Orc ---===//
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
10
11#define DEBUG_TYPE "orc"
12
13using namespace llvm;
14using namespace llvm::orc;
15
16void RedirectionManager::anchor() {}
17
19 ResourceTrackerSP RT, SymbolMap InitialDests) {
20 auto &JD = RT->getJITDylib();
21 return JD.define(std::make_unique<RedirectableMaterializationUnit>(
22 *this, std::move(InitialDests)),
23 RT);
24}
Lightweight error class with error context and mandatory checking.
Definition Error.h:159
Error define(std::unique_ptr< MaterializationUnitType > &&MU, ResourceTrackerSP RT=nullptr)
Define all symbols provided by the materialization unit to be part of this JITDylib.
Definition Core.h:1882
LLVM_ABI Error createRedirectableSymbols(ResourceTrackerSP RT, SymbolMap InitialDests)
Create redirectable symbols with given symbol names and initial desitnation symbol addresses.
JITDylib & getJITDylib() const
Return the JITDylib targeted by this tracker.
Definition Core.h:93
IntrusiveRefCntPtr< ResourceTracker > ResourceTrackerSP
Definition Core.h:52
DenseMap< SymbolStringPtr, ExecutorSymbolDef > SymbolMap
A map from symbol names (as SymbolStringPtrs) to JITSymbols (address/flags pairs).
This is an optimization pass for GlobalISel generic memory operations.