Page MenuHomePhabricator

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

Authored by rriddle on May 21 2021, 4:13 PM.

Details

Summary

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.

Diff Detail

Event Timeline

rriddle created this revision.May 21 2021, 4:13 PM
rriddle requested review of this revision.May 21 2021, 4:13 PM
GMNGeoffrey accepted this revision.May 21 2021, 4:14 PM
This revision is now accepted and ready to land.May 21 2021, 4:14 PM
mehdi_amini added inline comments.May 21 2021, 4:33 PM
mlir/lib/Support/MlirOptMain.cpp
112–113

Isn't the context.shouldPrintOpOnDiagnostic() part redundant here?

rriddle marked an inline comment as done.May 24 2021, 3:55 PM
rriddle added inline comments.
mlir/lib/Support/MlirOptMain.cpp
112–113

Yeah, it's cheap enough that it doesn't matter to check that here.

This revision was automatically updated to reflect the committed changes.
rriddle marked an inline comment as done.