diff options
author | Zachary Turner <zturner@google.com> | 2017-02-06 18:31:44 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-02-06 18:31:44 +0000 |
commit | 33aba3c290971bf10dd2f9503b3ac9f59e9254c0 (patch) | |
tree | 07cf4e201e248adc31fd7de4661cf4da34b2519d /lldb/source/Core/Communication.cpp | |
parent | 3c74c68b1bd9d78ef5be1ea67a8d28f2fadc6f35 (diff) | |
download | bcm5719-llvm-33aba3c290971bf10dd2f9503b3ac9f59e9254c0.tar.gz bcm5719-llvm-33aba3c290971bf10dd2f9503b3ac9f59e9254c0.zip |
Get rid of Error::PutToLog().
Instead just rely on LLDB_LOG().
This is part of an effort to sort out dependency hell in LLDB.
Error is in Utility, but Log is in Core. Core can depend on
Utility, but not vice versa. So this patch moves the knowledge
about how to log Errors from the Error class to the Log file.
Differential Revision: https://reviews.llvm.org/D29514
llvm-svn: 294210
Diffstat (limited to 'lldb/source/Core/Communication.cpp')
-rw-r--r-- | lldb/source/Core/Communication.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lldb/source/Core/Communication.cpp b/lldb/source/Core/Communication.cpp index 3d3abea6248..a631a5e096b 100644 --- a/lldb/source/Core/Communication.cpp +++ b/lldb/source/Core/Communication.cpp @@ -322,10 +322,9 @@ lldb::thread_result_t Communication::ReadThread(lldb::thread_arg_t p) { comm->Disconnect(); done = true; } - if (log) - error.LogIfError( - log, "%p Communication::ReadFromConnection () => status = %s", p, - Communication::ConnectionStatusAsCString(status)); + if (error.Fail()) + LLDB_LOG(log, "error: {0}, status = {1}", error, + Communication::ConnectionStatusAsCString(status)); break; case eConnectionStatusInterrupted: // Synchronization signal from // SynchronizeWithReadThread() @@ -340,10 +339,9 @@ lldb::thread_result_t Communication::ReadThread(lldb::thread_arg_t p) { done = true; LLVM_FALLTHROUGH; case eConnectionStatusTimedOut: // Request timed out - if (log) - error.LogIfError( - log, "%p Communication::ReadFromConnection () => status = %s", p, - Communication::ConnectionStatusAsCString(status)); + if (error.Fail()) + LLDB_LOG(log, "error: {0}, status = {1}", error, + Communication::ConnectionStatusAsCString(status)); break; } } |