diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2022-01-27 22:06:42 +0000 |
| commit | 6f8fc217eaa12bf657be1c6468ed9938d10168b3 (patch) | |
| tree | a1fd89b864d9b93e2ad68fe1dcf7afee2e3c8d76 /llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp | |
| parent | 77fc4c146f0870ffb09c1afb823ccbe742c5e6ff (diff) | |
Diffstat (limited to 'llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp')
| -rw-r--r-- | llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp index 232340c22a32..7cadf3bb51a7 100644 --- a/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp @@ -24,7 +24,7 @@ SimpleExecutorMemoryManager::~SimpleExecutorMemoryManager() { Expected<ExecutorAddr> SimpleExecutorMemoryManager::allocate(uint64_t Size) { std::error_code EC; auto MB = sys::Memory::allocateMappedMemory( - Size, 0, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC); + Size, nullptr, sys::Memory::MF_READ | sys::Memory::MF_WRITE, EC); if (EC) return errorCodeToError(EC); std::lock_guard<std::mutex> Lock(M); @@ -35,7 +35,7 @@ Expected<ExecutorAddr> SimpleExecutorMemoryManager::allocate(uint64_t Size) { Error SimpleExecutorMemoryManager::finalize(tpctypes::FinalizeRequest &FR) { ExecutorAddr Base(~0ULL); - std::vector<tpctypes::WrapperFunctionCall> DeallocationActions; + std::vector<shared::WrapperFunctionCall> DeallocationActions; size_t SuccessfulFinalizationActions = 0; if (FR.Segments.empty()) { @@ -52,8 +52,8 @@ Error SimpleExecutorMemoryManager::finalize(tpctypes::FinalizeRequest &FR) { Base = std::min(Base, Seg.Addr); for (auto &ActPair : FR.Actions) - if (ActPair.Deallocate.Func) - DeallocationActions.push_back(ActPair.Deallocate); + if (ActPair.Dealloc) + DeallocationActions.push_back(ActPair.Dealloc); // Get the Allocation for this finalization. size_t AllocSize = 0; @@ -96,7 +96,7 @@ Error SimpleExecutorMemoryManager::finalize(tpctypes::FinalizeRequest &FR) { while (SuccessfulFinalizationActions) Err = joinErrors(std::move(Err), FR.Actions[--SuccessfulFinalizationActions] - .Deallocate.runWithSPSRet()); + .Dealloc.runWithSPSRetErrorMerged()); // Deallocate memory. sys::MemoryBlock MB(AllocToDestroy.first, AllocToDestroy.second.Size); @@ -139,7 +139,7 @@ Error SimpleExecutorMemoryManager::finalize(tpctypes::FinalizeRequest &FR) { // Run finalization actions. for (auto &ActPair : FR.Actions) { - if (auto Err = ActPair.Finalize.runWithSPSRet()) + if (auto Err = ActPair.Finalize.runWithSPSRetErrorMerged()) return BailOut(std::move(Err)); ++SuccessfulFinalizationActions; } @@ -212,7 +212,7 @@ Error SimpleExecutorMemoryManager::deallocateImpl(void *Base, Allocation &A) { while (!A.DeallocationActions.empty()) { Err = joinErrors(std::move(Err), - A.DeallocationActions.back().runWithSPSRet()); + A.DeallocationActions.back().runWithSPSRetErrorMerged()); A.DeallocationActions.pop_back(); } |
