[PATCH] D78966: Don't crash on duplicate keys in dictionary attrs.
River Riddle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 15:07:18 PDT 2020
rriddle requested changes to this revision.
rriddle added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/lib/Parser/Parser.cpp:1710
+ llvm::SmallDenseSet<Identifier> uniquifier;
+ for (auto &namedAttr : attributes) {
+ if (!uniquifier.insert(namedAttr.first).second) {
----------------
Do this during parsing above to give better error location and avoid the need to iterate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78966/new/
https://reviews.llvm.org/D78966
More information about the llvm-commits
mailing list