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

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 26 08:52:48 PDT 2016


clayborg accepted this revision.
clayborg added a comment.
This revision is now accepted and ready to land.

Actually after looking at the JSON parser I see that it isn't using llvm::StringRef throughout. So I vote to keep the "const char *" for now since we need to guarantee that the JSON is null terminated. If we take a llvm::StringRef, then we will need to call llvm::StringRef::str() to make a std::string so we can guarantee that the JSON is null terminated which we do not want to have to do.

Either we include changing the JSON parser over to using llvm::StringRef throughout and change the constructors, or we leave things as "const char *" for now. I am assuming Todd doesn't want to take on the conversion over to llvm::StringRef so I am going to say I am ok with this change.


https://reviews.llvm.org/D23884





More information about the lldb-commits mailing list