[Lldb-commits] [PATCH] D23884: Add StructuredData unit tests; remove JSON parsing string copy

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 26 09:41:30 PDT 2016


zturner added a comment.

You mention a `StringRefExtractor`.  But nothing about `StringExtractor` that I can tell depends on the fact that it's null terminated.  It only needs to know where to stop.  A `StringRef` contains a length, so you stop when it gets to the end of the `StringRef`.  It seems to me like we don't need a `StringRefExtractor`, but rather that `StringExtractor` itself can just be updated to use a `StringRef` instead of a `std::string`.

Anyway, I will try to whip up a patch that converts `StringExtractor` to store a `StringRef` internally.  I'll put it up for review when I'm done just so you can see what I have in mind.  If it works great, if it doesn't oh well :)


https://reviews.llvm.org/D23884





More information about the lldb-commits mailing list