[PATCH] D15682: memory leak in LegacyPassManager.cpp

hui wu via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 5 21:19:08 PST 2016


huiwu added a comment.

If we add a pass twice into a ModulePass (for example, if a ModulePass depends on two FunctionPasses, and the second FunctionPass also depends on the first one), this leak can happen.

I think using unique_ptr can work, but need touch the key data structure of the pass management, and will be a much more complex fix.


Repository:
  rL LLVM

http://reviews.llvm.org/D15682





More information about the llvm-commits mailing list