diff options
author | Pavel Labath <labath@google.com> | 2017-11-09 15:45:09 +0000 |
---|---|---|
committer | Pavel Labath <labath@google.com> | 2017-11-09 15:45:09 +0000 |
commit | 1ebc85f86fd423db1366ba30ec029f19182bd4ea (patch) | |
tree | 1908bcfd0a09b648255cdad7724072865be15e48 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h | |
parent | 818da9bb299cad1a75e5e31dbd96dabb22f54cb8 (diff) | |
download | bcm5719-llvm-1ebc85f86fd423db1366ba30ec029f19182bd4ea.tar.gz bcm5719-llvm-1ebc85f86fd423db1366ba30ec029f19182bd4ea.zip |
llgs-tests: Replace the "log+return false" pattern with llvm::Error
Summary:
These tests used to log the error message and return plain bool mainly
because at the time they we written, we did not have a nice way to
assert on llvm::Error values. That is no longer true, so replace this
pattern with a more idiomatic approach.
As a part of this patch, I also move the formatting of
GDBRemoteCommunication::PacketResult values out of the test code, as
that can be useful elsewhere.
Reviewers: zturner, eugene
Subscribers: mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D39790
llvm-svn: 317795
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h index ce90de3e847..ecc9386e49c 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h @@ -290,4 +290,14 @@ private: } // namespace process_gdb_remote } // namespace lldb_private +namespace llvm { +template <> +struct format_provider< + lldb_private::process_gdb_remote::GDBRemoteCommunication::PacketResult> { + static void format(const lldb_private::process_gdb_remote:: + GDBRemoteCommunication::PacketResult &state, + raw_ostream &Stream, StringRef Style); +}; +} // namespace llvm + #endif // liblldb_GDBRemoteCommunication_h_ |