This is an archive of the discontinued LLVM Phabricator instance.

[mlir][AsmFormat] Avoid invalidating the iterator when verifying attributes
ClosedPublic

Authored by rriddle on Apr 7 2020, 3:42 PM.

Details

Summary

'it' may get invalidated when recursing into optional groups. This revision refactors the inner loop to avoid the need to compare the iterator after invalidation.

Diff Detail

Event Timeline

rriddle created this revision.Apr 7 2020, 3:42 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 7 2020, 3:42 PM
mehdi_amini accepted this revision.Apr 7 2020, 3:44 PM
mehdi_amini added inline comments.
mlir/tools/mlir-tblgen/OpFormatGen.cpp
1436

Refactoring and "functional" for is so often better :)

This revision is now accepted and ready to land.Apr 7 2020, 3:44 PM
benvanik accepted this revision.Apr 7 2020, 3:48 PM
This revision was automatically updated to reflect the committed changes.