jarin marked an inline comment as done.
jarin added inline comments.

================
Comment at: lldb/source/Utility/UUID.cpp:109
     *this = fromData(bytes);
-    return str.size() - rest.size();
+    return str.size();
   }
----------------
jankratochvil wrote:
> Now the return type could be `bool`.
I was worried about having to touch even more call sites, but perhaps it is not 
too bad.


================
Comment at: lldb/source/Utility/UUID.cpp:93-94
+bool UUID::SetFromStringRef(llvm::StringRef str) {
+  const size_t max_uuid_size = 20;
+  const size_t min_uuid_size = 4;
+
----------------
labath wrote:
> I don't think we should be restricting the size here in any way. It is 
> possible to produce larger build-ids already 
> (-Wl,--build-id=0xlonghexstring), and the rest of the UUID class does support 
> arbitrary sizes. Some tools (e.g. llvm-readelf) will choke on them, but let's 
> try to not make lldb one of those tools.
> 
> Using super-short uuids is most likely a bad idea, and will result in a lot 
> of collisions, but if someone really wants to use a 3-byte "uuid", I don't 
> see a reason to stop him here.
Good idea, that makes the code even simpler.


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

https://reviews.llvm.org/D80755



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to