[llvm] [JITLink] Always unmap standard segments in InProcessMemoryManager::deallocate (PR #81943)

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 18:00:16 PST 2024


lhames wrote:

Thanks for catching this @mshockwave!

Rather than using an optional, what if we just removed the condition here:

```c++
      if (!FA->DeallocActions.empty())
	DeallocActionsList.push_back(std::move(FA->DeallocActions));
```
and just unconditionally moved the `DeallocActions` vector? I think that should be as cheap as the optional, and otherwise have the same effect. 


https://github.com/llvm/llvm-project/pull/81943


More information about the llvm-commits mailing list