Keep output file after successful execution of mlir-opt
authorLukas Sommer <sommer@esa.tu-darmstadt.de>
Wed, 8 Apr 2020 03:24:08 +0000 (03:24 +0000)
committerMehdi Amini <joker.eph@gmail.com>
Wed, 8 Apr 2020 03:37:45 +0000 (03:37 +0000)
commitd86ece13d93870241d838d2873f123aa771b7077
tree1cf0810645a3ba6c9ef5b8a3c7b1de82b36028af
parent91eb442fdef0aacb996442042d2eeed52d71270b
Keep output file after successful execution of mlir-opt

Invoke `keep()` on the output file of `mlir-opt` in case the invocation of `MlirOptMain` was successful, to make sure the output file is not deleted on exit from `mlir-opt`.
Fixes a similar problem in `standalone-opt` from the example for an out-of-tree, standalone MLIR dialect.

This revision also adds a missing parameter to the invocation of `MlirOptMain` in `standalone-opt`.

Differential Revision: https://reviews.llvm.org/D77643
mlir/examples/standalone/standalone-opt/standalone-opt.cpp
mlir/test/mlir-opt/outputfile.mlir [new file with mode: 0644]
mlir/tools/mlir-opt/mlir-opt.cpp