[Mlir-commits] [mlir] [MLIR][mlir-opt] add support for disabling diagnostics (PR #117669)
Jeff Niu
llvmlistbot at llvm.org
Tue Nov 26 09:00:23 PST 2024
================
@@ -113,6 +113,10 @@ struct MlirOptMainConfigCLOptions : public MlirOptMainConfig {
cl::desc("Enable Debugger hook for debugging MLIR Actions"),
cl::location(enableDebuggerActionHookFlag), cl::init(false));
+ static cl::opt<bool, /*ExternalStorage=*/true> disableRemarkDiagnostic(
+ "mlir-disable-diagnostic", cl::desc("Disable diagnostic information"),
----------------
Mogball wrote:
Mehdi has a point: fully disabling diagnostics is not really a helpful flag. Plus, MLIR will still emit diagnostics even without a SourceMgrDiagnosticHandler. It might be better to change the flag to select a verbosity to suppress (1=remarks, 2=warnings, 3=everything) and then create a ScopedDiagnosticHandler that eats the diagnostics fitting that level.
https://github.com/llvm/llvm-project/pull/117669
More information about the Mlir-commits
mailing list