diff --git a/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp b/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp index 474a0b5160bcb0..dacf0e6c8aa4f2 100644 --- a/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp +++ b/llvm/lib/ExecutionEngine/JITLink/JITLinkMemoryManager.cpp @@ -449,8 +449,7 @@ void InProcessMemoryManager::deallocate(std::vector Allocs, for (auto &Alloc : Allocs) { auto *FA = Alloc.release().toPtr(); StandardSegmentsList.push_back(std::move(FA->StandardSegments)); - if (!FA->DeallocActions.empty()) - DeallocActionsList.push_back(std::move(FA->DeallocActions)); + DeallocActionsList.push_back(std::move(FA->DeallocActions)); FA->~FinalizedAllocInfo(); FinalizedAllocInfos.Deallocate(FA); }