diff options
Diffstat (limited to 'lldb/source/API/SBWatchpoint.cpp')
-rw-r--r-- | lldb/source/API/SBWatchpoint.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lldb/source/API/SBWatchpoint.cpp b/lldb/source/API/SBWatchpoint.cpp index ed25d65c779..de7ba95b1b9 100644 --- a/lldb/source/API/SBWatchpoint.cpp +++ b/lldb/source/API/SBWatchpoint.cpp @@ -70,6 +70,20 @@ SBWatchpoint::operator bool() const { return bool(m_opaque_wp.lock()); } +bool SBWatchpoint::operator==(const SBWatchpoint &rhs) const { + LLDB_RECORD_METHOD_CONST( + bool, SBWatchpoint, operator==,(const SBWatchpoint &), rhs); + + return GetSP() == rhs.GetSP(); +} + +bool SBWatchpoint::operator!=(const SBWatchpoint &rhs) const { + LLDB_RECORD_METHOD_CONST( + bool, SBWatchpoint, operator!=,(const SBWatchpoint &), rhs); + + return !(*this == rhs); +} + SBError SBWatchpoint::GetError() { LLDB_RECORD_METHOD_NO_ARGS(lldb::SBError, SBWatchpoint, GetError); @@ -303,6 +317,10 @@ void RegisterMethods<SBWatchpoint>(Registry &R) { LLDB_REGISTER_METHOD(lldb::watch_id_t, SBWatchpoint, GetID, ()); LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, IsValid, ()); LLDB_REGISTER_METHOD_CONST(bool, SBWatchpoint, operator bool, ()); + LLDB_REGISTER_METHOD_CONST( + bool, SBWatchpoint, operator==,(const lldb::SBWatchpoint &)); + LLDB_REGISTER_METHOD_CONST( + bool, SBWatchpoint, operator!=,(const lldb::SBWatchpoint &)); LLDB_REGISTER_METHOD(lldb::SBError, SBWatchpoint, GetError, ()); LLDB_REGISTER_METHOD(int32_t, SBWatchpoint, GetHardwareIndex, ()); LLDB_REGISTER_METHOD(lldb::addr_t, SBWatchpoint, GetWatchAddress, ()); |