summaryrefslogtreecommitdiff
path: root/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp')
-rw-r--r--llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp b/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
index d44199f1698e..9999e1ff3bf0 100644
--- a/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/OrcV2CBindings.cpp
@@ -1021,8 +1021,10 @@ LLVMOrcObjectLayerRef
LLVMOrcCreateRTDyldObjectLinkingLayerWithSectionMemoryManager(
LLVMOrcExecutionSessionRef ES) {
assert(ES && "ES must not be null");
- return wrap(new RTDyldObjectLinkingLayer(
- *unwrap(ES), [] { return std::make_unique<SectionMemoryManager>(); }));
+ return wrap(
+ new RTDyldObjectLinkingLayer(*unwrap(ES), [](const MemoryBuffer &) {
+ return std::make_unique<SectionMemoryManager>();
+ }));
}
LLVMOrcObjectLayerRef
@@ -1128,9 +1130,10 @@ LLVMOrcCreateRTDyldObjectLinkingLayerWithMCJITMemoryManagerLikeCallbacks(
CreateContextCtx, CreateContext, NotifyTerminating, AllocateCodeSection,
AllocateDataSection, FinalizeMemory, Destroy);
- return wrap(new RTDyldObjectLinkingLayer(*unwrap(ES), [CBs = std::move(CBs)] {
- return std::make_unique<MCJITMemoryManagerLikeCallbacksMemMgr>(CBs);
- }));
+ return wrap(new RTDyldObjectLinkingLayer(
+ *unwrap(ES), [CBs = std::move(CBs)](const MemoryBuffer &) {
+ return std::make_unique<MCJITMemoryManagerLikeCallbacksMemMgr>(CBs);
+ }));
return nullptr;
}