[mlir][AsmFormat] Avoid invalidating the iterator when verifying attributes
authorRiver Riddle <riddleriver@gmail.com>
Tue, 7 Apr 2020 22:51:42 +0000 (15:51 -0700)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 7 Apr 2020 22:54:56 +0000 (15:54 -0700)
commit8b7e669e68f9a8e2aa133d0f695a250fc3381e3a
treef5377ed6701677f5696379c2a66796241cda143e
parent6011627f5118dd64a0c33694b604c70e766d8c40
[mlir][AsmFormat] Avoid invalidating the iterator when verifying attributes

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.

Differential Revision: https://reviews.llvm.org/D77686
mlir/tools/mlir-tblgen/OpFormatGen.cpp