[PATCH] D78781: [mlir][DictionaryAttr] Add a new getWithSorted and use it when possible

River Riddle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 11:21:08 PDT 2020


rriddle marked 4 inline comments as done.
rriddle added inline comments.


================
Comment at: mlir/lib/IR/Attributes.cpp:101
+  // a difference.
+  return strncmp(attr.first.data(), name.data(), name.size()) < 0;
+}
----------------
mehdi_amini wrote:
> If Attr is a non zero terminated string that is a prefix of name, won’t this read out of bound?
Attr guarantees null termination because it uses Identifier.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78781/new/

https://reviews.llvm.org/D78781





More information about the llvm-commits mailing list