Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add delete to fix resource leak in llc.cpp
From line 693 in file llc.cpp, it uses new operator to creates a ModulePass and assigned to MMIWP. If the condition after take the true branch, it has chance to go in to line 702 or line 709, the function will return without cleaning the memory. The second issue existed for the same reason, the ref TPC get the pointer created from LLVMTM.createPassConfig, and will leak memory if goes into line 709. This patch uses delete in the issued branch. Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D147993
- Loading branch information