[PATCH] D147993: Add delete to fix resource leak in llc.cpp

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 11 12:52:30 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/tools/llc/llc.cpp:702
             << "run-pass is for .mir file only.\n";
+        delete MMIWP;
         return 1;
----------------
Why is it only a leak on these paths? The are other `return 1` in this function.

Can we use std::unique_ptr where these are created?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D147993/new/

https://reviews.llvm.org/D147993



More information about the llvm-commits mailing list