|
6 | 6 | // |
7 | 7 | //===----------------------------------------------------------------------===// |
8 | 8 |
|
| 9 | +#include <memory> |
| 10 | + |
9 | 11 | #include "llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h" |
10 | 12 | #include "llvm/Object/COFF.h" |
11 | 13 |
|
@@ -184,19 +186,22 @@ void RTDyldObjectLinkingLayer::emit( |
184 | 186 | std::shared_ptr<MaterializationResponsibility> SharedR(std::move(R)); |
185 | 187 | auto Deps = std::make_unique<SymbolDependenceMap>(); |
186 | 188 |
|
187 | | - JITDylibSearchOrderResolver Resolver(*SharedR, *Deps); |
| 189 | + auto Resolver = |
| 190 | + std::make_unique<JITDylibSearchOrderResolver>(*SharedR, *Deps); |
| 191 | + auto *ResolverPtr = Resolver.get(); |
188 | 192 |
|
189 | 193 | jitLinkForORC( |
190 | 194 | object::OwningBinary<object::ObjectFile>(std::move(*Obj), std::move(O)), |
191 | | - MemMgrRef, Resolver, ProcessAllSections, |
| 195 | + MemMgrRef, *ResolverPtr, ProcessAllSections, |
192 | 196 | [this, SharedR, &MemMgrRef, InternalSymbols]( |
193 | 197 | const object::ObjectFile &Obj, |
194 | 198 | RuntimeDyld::LoadedObjectInfo &LoadedObjInfo, |
195 | 199 | std::map<StringRef, JITEvaluatedSymbol> ResolvedSymbols) { |
196 | 200 | return onObjLoad(*SharedR, Obj, MemMgrRef, LoadedObjInfo, |
197 | 201 | ResolvedSymbols, *InternalSymbols); |
198 | 202 | }, |
199 | | - [this, SharedR, MemMgr = std::move(MemMgr), Deps = std::move(Deps)]( |
| 203 | + [this, SharedR, MemMgr = std::move(MemMgr), Deps = std::move(Deps), |
| 204 | + Resolver = std::move(Resolver)]( |
200 | 205 | object::OwningBinary<object::ObjectFile> Obj, |
201 | 206 | std::unique_ptr<RuntimeDyld::LoadedObjectInfo> LoadedObjInfo, |
202 | 207 | Error Err) mutable { |
|
0 commit comments