[mlir] Add mlir translate flag to print errors only.
authorTobias Gysi <tobias.gysi@nextsilicon.com>
Tue, 16 May 2023 07:21:22 +0000 (07:21 +0000)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Tue, 16 May 2023 07:32:13 +0000 (07:32 +0000)
commit1ade6f36e3b4652a17499ae261e60d5b0de52ce0
tree3a99bdbbcb4aeeb885df7005af262d475b632387
parent258c9bebbdfa793493b71db555f5deb5ade499b4
[mlir] Add mlir translate flag to print errors only.

The revision adds a flag to mlir translate that suppresses
any non-error diagnostics. The flag is useful when importing
LLVM IR to LLVM dialect, which produces a lot of
warnings due to dropped metadata and debug intrinsics.

Reviewed By: Dinistro

Differential Revision: https://reviews.llvm.org/D150547
mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp
mlir/test/mlir-translate/import-error-only.ll [new file with mode: 0644]