This is an archive of the discontinued LLVM Phabricator instance.

[mlir][LLVM] Improve error handling in switch parsing
ClosedPublic

Authored by Dinistro on Jun 27 2023, 12:57 AM.

Details

Summary

This commit changes the 'llvm.switch' parsing to not silently fail when
it encounters superfluous commas in the case list.

Diff Detail

Event Timeline

Dinistro created this revision.Jun 27 2023, 12:57 AM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Dinistro requested review of this revision.Jun 27 2023, 12:57 AM
gysit added inline comments.Jun 27 2023, 1:13 AM
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
401–402

nit: the angular brackets are now part of the format.

440–441

This seems unnecessary now since the empty case is already handled above?

Dinistro updated this revision to Diff 534866.Jun 27 2023, 1:17 AM

address review comments

Dinistro marked 2 inline comments as done.Jun 27 2023, 1:18 AM
gysit accepted this revision.Jun 27 2023, 1:19 AM

LGTM!

This revision is now accepted and ready to land.Jun 27 2023, 1:19 AM
This revision was automatically updated to reflect the committed changes.