From c1edf566b9ba18806c9a69e77db1cc8e57a14c8d Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Fri, 11 Nov 2016 04:29:25 +0000 Subject: Prevent at compile time converting from Error::success() to Expected This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562 --- lldb/source/Host/common/NativeBreakpointList.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lldb/source/Host/common/NativeBreakpointList.cpp') diff --git a/lldb/source/Host/common/NativeBreakpointList.cpp b/lldb/source/Host/common/NativeBreakpointList.cpp index 58e1c3e9da6..df5bce8079e 100644 --- a/lldb/source/Host/common/NativeBreakpointList.cpp +++ b/lldb/source/Host/common/NativeBreakpointList.cpp @@ -40,7 +40,7 @@ Error NativeBreakpointList::AddRef(lldb::addr_t addr, size_t size_hint, __FUNCTION__, addr); iter->second->AddRef(); - return Error::success(); + return Error(); } // Create a new breakpoint using the given create func. @@ -205,7 +205,7 @@ Error NativeBreakpointList::GetBreakpoint(lldb::addr_t addr, // Disable it. breakpoint_sp = iter->second; - return Error::success(); + return Error(); } Error NativeBreakpointList::RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf, @@ -225,5 +225,5 @@ Error NativeBreakpointList::RemoveTrapsFromBuffer(lldb::addr_t addr, void *buf, auto opcode_size = software_bp_sp->m_opcode_size; ::memcpy(opcode_addr, saved_opcodes, opcode_size); } - return Error::success(); + return Error(); } -- cgit v1.2.3