[Lldb-commits] [PATCH] D127922: [lldb] Introduce the concept of a log handler (NFC)
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 16 10:54:30 PDT 2022
mib added inline comments.
================
Comment at: lldb/source/Utility/Log.cpp:325
std::lock_guard<std::recursive_mutex> guard(g_LogThreadedMutex);
- *stream_sp << message;
- stream_sp->flush();
+ handler_sp->Emit(message);
+ handler_sp->Flush();
----------------
JDevlieghere wrote:
> clayborg wrote:
> > Will this copy the string? The Emit() calls take a "std::string", maybe we should switch it to "const std::string &" to avoid any copies?
> Yeah, was planning on `std::move`-ing everything but I already found a few cases where that doesn't work. This should indeed take a reference.
+1
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127922/new/
https://reviews.llvm.org/D127922
More information about the lldb-commits
mailing list