Page MenuHomePhabricator

[mlir] do not hardcode the name of the undefined function in the error message
ClosedPublic

Authored by ftynse on Fri, Jun 26, 10:05 AM.

Details

Summary

The error message in the std.constant verifier for function-typed constants
had the name of the undefined function hardcoded to bar. Report the actual
name instead.

Diff Detail

Event Timeline

ftynse created this revision.Fri, Jun 26, 10:05 AM
Herald added a project: Restricted Project. · View Herald TranscriptFri, Jun 26, 10:05 AM
silvas accepted this revision.Fri, Jun 26, 10:45 AM
silvas added a subscriber: silvas.

Thanks!

This revision is now accepted and ready to land.Fri, Jun 26, 10:45 AM
stephenneuendorffer added inline comments.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
1124

nit: Generally, the first part of the message gets passed as an argument to emitOpError...

rriddle accepted this revision.Fri, Jun 26, 12:09 PM
ftynse marked an inline comment as done.Mon, Jun 29, 12:54 AM
ftynse added inline comments.
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
1124

I see two occurrences of passing the first part as argument and fifteen of using repeated operator<< in this file, so I prefer (at least local) consistency.

This revision was automatically updated to reflect the committed changes.