[lldb][NFCI] Stop creating additional temporary string in Log::VAPrintf
Instead of creating a std::string from the `SmallString`, let's just use a std::string from the start. I initially tried to make `SmallString` work but getting it right proved complicated because `LogHandler::Emit` will take its `StringRef` parameter and touch the raw `const char *` from it directly, which isn't guaranteed to be null-terminated with a `SmallString`. I changed `WriteMessage` to take a `StringRef` instead of a `const std::string &` for flexibility. Differential Revision: https://reviews.llvm.org/D148676
Loading
Please sign in to comment