================
@@ -438,3 +439,15 @@ void RotatingLogHandler::Dump(llvm::raw_ostream &stream)
const {
}
stream.flush();
}
+
+TeeLogHandler::TeeLogHandler(std::shared_ptr<LogHandler> first_log_handler,
+ std::shared_ptr<LogHandler> second_log_handler)
+ : m_first_log_handler(first_log_handler),
+ m_second_log_handler(second_log_handler) {}
+
+void TeeLogHandler::Emit(llvm::StringRef message) {
+ if (m_first_log_handler)
----------------
JDevlieghere wrote:
No, it's just being resilient agains the shared_ptrs being null. The
alternative would be an assert in the ctor. Let me know if you prefer that? It
would be slightly more efficient.
https://github.com/llvm/llvm-project/pull/90984
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits