[PATCH] D77643: Keep output file after successful execution of mlir-opt
Lukas Sommer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 7 07:00:53 PDT 2020
LukasSommerTu added a comment.
In the current design not. `MlirOptMain` does not receive the file itself, but rather an output stream, so it cannot manage the file.
We could of course change the signature of `MlirOptMain` to accept a `ToolOutputFile` instead, but that would loose some generality, because one would always have to create a `ToolOutputFile` for invoking `MlirOptMain` instead of the more general `raw_ostream`. Alternatively, we could add another method to `MlirOptMain.cpp` that manages the file and internally invokes the original `MlirOptMain` again.
What would you prefer?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77643/new/
https://reviews.llvm.org/D77643
More information about the llvm-commits
mailing list