This is an archive of the discontinued LLVM Phabricator instance.

[mlir] fix bugs with NamedAttrList
ClosedPublic

Authored by Mogball on Oct 18 2021, 5:49 PM.

Details

Summary
  • assign with ArrayRef was calling append
  • assign with empty ArrayRef was not clearing storage

Diff Detail

Event Timeline

Mogball created this revision.Oct 18 2021, 5:49 PM
Mogball requested review of this revision.Oct 18 2021, 5:49 PM
Mogball edited reviewers, added: jpienaar; removed: rriddle.Oct 18 2021, 5:50 PM
jpienaar accepted this revision.Oct 18 2021, 5:54 PM

Thanks for fixing my typo :-)

mlir/lib/IR/BuiltinAttributes.cpp
72

Could we use clear instead?

mlir/unittests/IR/OperationSupportTest.cpp
245

Do you want to check contents as above to ensure this was an assign?

This revision is now accepted and ready to land.Oct 18 2021, 5:54 PM
Mogball updated this revision to Diff 380558.Oct 18 2021, 6:05 PM
Mogball marked 2 inline comments as done.

Rebase with upstream

This revision was automatically updated to reflect the committed changes.