This is an archive of the discontinued LLVM Phabricator instance.

Switch generatedTypeParser/generatedAttributeParser to return an OptionalParseResult
ClosedPublic

Authored by mehdi_amini on Mar 7 2021, 10:08 PM.

Details

Summary

This allows the caller to distinguish between a parse error or an
unmatched keyword. It fixes the redundant error that was emitted by the
caller when the generated parser would fail.

Diff Detail

Event Timeline

mehdi_amini created this revision.Mar 7 2021, 10:08 PM
mehdi_amini requested review of this revision.Mar 7 2021, 10:08 PM
ftynse accepted this revision.Mar 8 2021, 2:04 AM
ftynse added inline comments.
mlir/lib/Dialect/Async/IR/Async.cpp
337–344

Nit: the extra scope is not necessary at the end of the function

This revision is now accepted and ready to land.Mar 8 2021, 2:04 AM
jpienaar added inline comments.
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
2510–2517

Could you fix this error style while here?

rriddle accepted this revision.Mar 8 2021, 11:35 AM
rriddle added inline comments.
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
816

Missing newlines at the end of this line and the one below.

mehdi_amini marked 3 inline comments as done.Mar 8 2021, 1:54 PM

Address comments

This revision was landed with ongoing or failed builds.Mar 9 2021, 11:50 AM
This revision was automatically updated to reflect the committed changes.

Broke flang builds.

Sorry about that, I have a local fix, still running the tests and I'll push shortly!