[Lldb-commits] [lldb] [lldb] Log errors to the system log if they would otherwise get dropped (PR #111911)

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 11 00:02:54 PDT 2024


================
@@ -460,3 +464,7 @@ void TeeLogHandler::Emit(llvm::StringRef message) {
   m_first_log_handler->Emit(message);
   m_second_log_handler->Emit(message);
 }
+
+void lldb_private::SetLLDBErrorLog(Log *log) { g_error_log.exchange(log); }
----------------
labath wrote:

```suggestion
void lldb_private::SetLLDBErrorLog(Log *log) { g_error_log.store(log); }
```

exchange is of no use if you're not actually using the previous value.

https://github.com/llvm/llvm-project/pull/111911


More information about the lldb-commits mailing list