diff options
-rw-r--r-- | tools/opt/opt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 99249b9442..4ef1a6e39c 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -365,6 +365,9 @@ int main(int argc, char **argv) { // Now that we have all of the passes ready, run them. Passes.run(*M.get()); + // Delete the ofstream. + if (Out != &std::cout) + delete Out; return 0; } catch (const std::string& msg) { |