[mlir-opt] Don't enable `printOpOnDiagnostic` if it was explicitly disabled.

We are currently explicitly setting the flag solely based on the value of `-verify`, which ends up ignoring the situation where the user explicitly disabled this option from the command line.

Differential Revision: https://reviews.llvm.org/D102952
This commit is contained in:
River Riddle 2021-05-24 15:56:22 -07:00
parent b2cd895011
commit 60c735d409
1 changed files with 2 additions and 1 deletions

View File

@ -109,7 +109,8 @@ static LogicalResult processBuffer(raw_ostream &os,
if (preloadDialectsInContext)
context.loadAllAvailableDialects();
context.allowUnregisteredDialects(allowUnregisteredDialects);
context.printOpOnDiagnostic(!verifyDiagnostics);
if (verifyDiagnostics)
context.printOpOnDiagnostic(false);
context.getDebugActionManager().registerActionHandler<DebugCounter>();
// If we are in verify diagnostics mode then we have a lot of work to do,