[Lldb-commits] [lldb] r286562 - Prevent at compile time converting from Error::success() to Expected<T>

Mehdi Amini via lldb-commits lldb-commits at lists.llvm.org
Thu Nov 10 20:29:27 PST 2016


Author: mehdi_amini
Date: Thu Nov 10 22:29:25 2016
New Revision: 286562

URL: http://llvm.org/viewvc/llvm-project?rev=286562&view=rev
Log:
Prevent at compile time converting from Error::success() to Expected<T>

This would trigger an assertion at runtime otherwise.

Differential Revision: https://reviews.llvm.org/D26482

Modified:
    lldb/trunk/include/lldb/Target/Process.h
    lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
    lldb/trunk/source/Commands/CommandObjectExpression.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Host/common/NativeBreakpoint.cpp
    lldb/trunk/source/Host/common/NativeBreakpointList.cpp
    lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
    lldb/trunk/source/Host/common/NativeWatchpointList.cpp
    lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
    lldb/trunk/source/Host/posix/FileSystem.cpp
    lldb/trunk/source/Host/posix/MainLoopPosix.cpp
    lldb/trunk/source/Host/posix/PipePosix.cpp
    lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
    lldb/trunk/source/Interpreter/OptionValueString.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
    lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
    lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
    lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
    lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
    lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
    lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
    lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
    lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
    lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
    lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
    lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
    lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
    lldb/trunk/source/Target/Platform.cpp
    lldb/trunk/source/Target/Process.cpp
    lldb/trunk/source/Target/Thread.cpp
    lldb/trunk/source/Utility/ModuleCache.cpp
    lldb/trunk/tools/lldb-server/lldb-platform.cpp
    lldb/trunk/unittests/Utility/ModuleCacheTest.cpp

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Thu Nov 10 22:29:25 2016
@@ -1082,9 +1082,7 @@ public:
   /// @return
   ///     Returns an error object.
   //------------------------------------------------------------------
-  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) {
-    return Error::success();
-  }
+  virtual Error WillAttachToProcessWithID(lldb::pid_t pid) { return Error(); }
 
   //------------------------------------------------------------------
   /// Called before attaching to a process.
@@ -1097,7 +1095,7 @@ public:
   //------------------------------------------------------------------
   virtual Error WillAttachToProcessWithName(const char *process_name,
                                             bool wait_for_launch) {
-    return Error::success();
+    return Error();
   }
 
   //------------------------------------------------------------------
@@ -1206,7 +1204,7 @@ public:
   /// @return
   ///     Returns an error object.
   //------------------------------------------------------------------
-  virtual Error WillLaunch(Module *module) { return Error::success(); }
+  virtual Error WillLaunch(Module *module) { return Error(); }
 
   //------------------------------------------------------------------
   /// Launch a new process.
@@ -1252,7 +1250,7 @@ public:
   /// @return
   ///     Returns an error object.
   //------------------------------------------------------------------
-  virtual Error WillResume() { return Error::success(); }
+  virtual Error WillResume() { return Error(); }
 
   //------------------------------------------------------------------
   /// Resumes all of a process's threads as configured using the
@@ -1296,7 +1294,7 @@ public:
   /// @return
   ///     Returns an error object.
   //------------------------------------------------------------------
-  virtual Error WillHalt() { return Error::success(); }
+  virtual Error WillHalt() { return Error(); }
 
   //------------------------------------------------------------------
   /// Halts a running process.
@@ -1343,7 +1341,7 @@ public:
   /// @return
   ///     Returns an error object.
   //------------------------------------------------------------------
-  virtual Error WillDetach() { return Error::success(); }
+  virtual Error WillDetach() { return Error(); }
 
   //------------------------------------------------------------------
   /// Detaches from a running or stopped process.
@@ -1381,7 +1379,7 @@ public:
   ///     Process::DoSignal(int), otherwise an error describing what
   ///     prevents the signal from being sent.
   //------------------------------------------------------------------
-  virtual Error WillSignal() { return Error::success(); }
+  virtual Error WillSignal() { return Error(); }
 
   //------------------------------------------------------------------
   /// Sends a process a UNIX signal \a signal.
@@ -1397,7 +1395,7 @@ public:
     return error;
   }
 
-  virtual Error WillDestroy() { return Error::success(); }
+  virtual Error WillDestroy() { return Error(); }
 
   virtual Error DoDestroy() = 0;
 

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.cpp Thu Nov 10 22:29:25 2016
@@ -231,7 +231,7 @@ Error CommandObjectDisassemble::CommandO
     ExecutionContext *execution_context) {
   if (!some_location_specified)
     current_function = true;
-  return Error::success();
+  return Error();
 }
 
 llvm::ArrayRef<OptionDefinition>

Modified: lldb/trunk/source/Commands/CommandObjectExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectExpression.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp Thu Nov 10 22:29:25 2016
@@ -303,7 +303,7 @@ CanBeUsedForElementCountPrinting(ValueOb
     return Error("as it does not refer to a pointer");
   if (pointee.IsVoidType())
     return Error("as it refers to a pointer to void");
-  return Error::success();
+  return Error();
 }
 
 bool CommandObjectExpression::EvaluateExpression(const char *expr,

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Thu Nov 10 22:29:25 2016
@@ -788,7 +788,7 @@ Error ModuleList::GetSharedModule(const
               *did_create_ptr = true;
 
             shared_module_list.ReplaceEquivalent(module_sp);
-            return Error::success();
+            return Error();
           }
         }
       } else {

Modified: lldb/trunk/source/Host/common/NativeBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeBreakpoint.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeBreakpoint.cpp (original)
+++ lldb/trunk/source/Host/common/NativeBreakpoint.cpp Thu Nov 10 22:29:25 2016
@@ -53,7 +53,7 @@ Error NativeBreakpoint::Enable() {
       log->Printf("NativeBreakpoint::%s addr = 0x%" PRIx64
                   " already enabled, ignoring.",
                   __FUNCTION__, m_addr);
-    return Error::success();
+    return Error();
   }
 
   // Log and enable.
@@ -85,7 +85,7 @@ Error NativeBreakpoint::Disable() {
       log->Printf("NativeBreakpoint::%s addr = 0x%" PRIx64
                   " already disabled, ignoring.",
                   __FUNCTION__, m_addr);
-    return Error::success();
+    return Error();
   }
 
   // Log and disable.

Modified: lldb/trunk/source/Host/common/NativeBreakpointList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeBreakpointList.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeBreakpointList.cpp (original)
+++ lldb/trunk/source/Host/common/NativeBreakpointList.cpp Thu Nov 10 22:29:25 2016
@@ -40,7 +40,7 @@ Error NativeBreakpointList::AddRef(lldb:
                   __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::GetBreakpoin
 
   // 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::RemoveTrapsF
     auto opcode_size = software_bp_sp->m_opcode_size;
     ::memcpy(opcode_addr, saved_opcodes, opcode_size);
   }
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/source/Host/common/NativeProcessProtocol.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeProcessProtocol.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeProcessProtocol.cpp (original)
+++ lldb/trunk/source/Host/common/NativeProcessProtocol.cpp Thu Nov 10 22:29:25 2016
@@ -405,7 +405,7 @@ Error NativeProcessProtocol::ResolveProc
 
   arch = module_specs.GetModuleSpecRefAtIndex(0).GetArchitecture();
   if (arch.IsValid())
-    return Error::success();
+    return Error();
   else
     return Error("failed to retrieve a valid architecture from the exe module");
 }

Modified: lldb/trunk/source/Host/common/NativeWatchpointList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/NativeWatchpointList.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/NativeWatchpointList.cpp (original)
+++ lldb/trunk/source/Host/common/NativeWatchpointList.cpp Thu Nov 10 22:29:25 2016
@@ -17,12 +17,12 @@ using namespace lldb_private;
 Error NativeWatchpointList::Add(addr_t addr, size_t size, uint32_t watch_flags,
                                 bool hardware) {
   m_watchpoints[addr] = {addr, size, watch_flags, hardware};
-  return Error::success();
+  return Error();
 }
 
 Error NativeWatchpointList::Remove(addr_t addr) {
   m_watchpoints.erase(addr);
-  return Error::success();
+  return Error();
 }
 
 const NativeWatchpointList::WatchpointMap &

Modified: lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp (original)
+++ lldb/trunk/source/Host/common/SoftwareBreakpoint.cpp Thu Nov 10 22:29:25 2016
@@ -103,7 +103,7 @@ Error SoftwareBreakpoint::CreateSoftware
   // breakpoint.
   breakpoint_sp.reset(new SoftwareBreakpoint(process, addr, saved_opcode_bytes,
                                              bp_opcode_bytes, bp_opcode_size));
-  return Error::success();
+  return Error();
 }
 
 Error SoftwareBreakpoint::EnableSoftwareBreakpoint(
@@ -219,7 +219,7 @@ Error SoftwareBreakpoint::EnableSoftware
     log->Printf("SoftwareBreakpoint::%s addr = 0x%" PRIx64 " -- SUCCESS",
                 __FUNCTION__, addr);
 
-  return Error::success();
+  return Error();
 }
 
 // -------------------------------------------------------------------

Modified: lldb/trunk/source/Host/posix/FileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/FileSystem.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/FileSystem.cpp (original)
+++ lldb/trunk/source/Host/posix/FileSystem.cpp Thu Nov 10 22:29:25 2016
@@ -62,7 +62,7 @@ Error FileSystem::MakeDirectory(const Fi
       } break;
       case EEXIST: {
         if (file_spec.IsDirectory())
-          return Error::success(); // It is a directory and it already exists
+          return Error(); // It is a directory and it already exists
       } break;
       }
     }
@@ -210,7 +210,7 @@ Error FileSystem::ResolveSymbolicLink(co
 
   dst = FileSpec(real_path, false);
 
-  return Error::success();
+  return Error();
 }
 
 #if defined(__NetBSD__)

Modified: lldb/trunk/source/Host/posix/MainLoopPosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/MainLoopPosix.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/MainLoopPosix.cpp (original)
+++ lldb/trunk/source/Host/posix/MainLoopPosix.cpp Thu Nov 10 22:29:25 2016
@@ -160,7 +160,7 @@ Error MainLoopPosix::Run() {
       it->second.callback(*this); // Do the work
 
       if (m_terminate_request)
-        return Error::success();
+        return Error();
     }
 
     for (int fd : read_fds) {
@@ -175,8 +175,8 @@ Error MainLoopPosix::Run() {
       it->second(*this); // Do the work
 
       if (m_terminate_request)
-        return Error::success();
+        return Error();
     }
   }
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/source/Host/posix/PipePosix.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/posix/PipePosix.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Host/posix/PipePosix.cpp (original)
+++ lldb/trunk/source/Host/posix/PipePosix.cpp Thu Nov 10 22:29:25 2016
@@ -206,7 +206,7 @@ Error PipePosix::OpenAsWriterWithTimeout
     }
   }
 
-  return Error::success();
+  return Error();
 }
 
 int PipePosix::GetReadFileDescriptor() const { return m_fds[READ]; }

Modified: lldb/trunk/source/Interpreter/OptionGroupVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupVariable.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupVariable.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupVariable.cpp Thu Nov 10 22:29:25 2016
@@ -59,13 +59,13 @@ static Error ValidateNamedSummary(const
   if (DataVisualization::NamedSummaryFormats::GetSummaryFormat(
           ConstString(str), summary_sp) == false)
     return Error("must specify a valid named summary");
-  return Error::success();
+  return Error();
 }
 
 static Error ValidateSummaryString(const char *str, void *) {
   if (!str || !str[0])
     return Error("must specify a non-empty summary string");
-  return Error::success();
+  return Error();
 }
 
 OptionGroupVariable::OptionGroupVariable(bool show_frame_options)

Modified: lldb/trunk/source/Interpreter/OptionValueString.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionValueString.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionValueString.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionValueString.cpp Thu Nov 10 22:29:25 2016
@@ -133,7 +133,7 @@ Error OptionValueString::SetCurrentValue
       return error;
   }
   m_current_value.assign(value);
-  return Error::success();
+  return Error();
 }
 
 Error OptionValueString::AppendToCurrentValue(const char *value) {
@@ -148,5 +148,5 @@ Error OptionValueString::AppendToCurrent
     } else
       m_current_value.append(value);
   }
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp Thu Nov 10 22:29:25 2016
@@ -213,7 +213,7 @@ ModuleSP DynamicLoaderHexagonDYLD::GetTa
 }
 
 // AD: Needs to be updated?
-Error DynamicLoaderHexagonDYLD::CanLoadImage() { return Error::success(); }
+Error DynamicLoaderHexagonDYLD::CanLoadImage() { return Error(); }
 
 void DynamicLoaderHexagonDYLD::UpdateLoadedSections(ModuleSP module,
                                                     addr_t link_map_addr,

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp Thu Nov 10 22:29:25 2016
@@ -221,7 +221,7 @@ void DynamicLoaderPOSIXDYLD::DidLaunch()
   }
 }
 
-Error DynamicLoaderPOSIXDYLD::CanLoadImage() { return Error::success(); }
+Error DynamicLoaderPOSIXDYLD::CanLoadImage() { return Error(); }
 
 void DynamicLoaderPOSIXDYLD::UpdateLoadedSections(ModuleSP module,
                                                   addr_t link_map_addr,

Modified: lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp Thu Nov 10 22:29:25 2016
@@ -61,7 +61,7 @@ void DynamicLoaderWindowsDYLD::DidAttach
 
 void DynamicLoaderWindowsDYLD::DidLaunch() {}
 
-Error DynamicLoaderWindowsDYLD::CanLoadImage() { return Error::success(); }
+Error DynamicLoaderWindowsDYLD::CanLoadImage() { return Error(); }
 
 ConstString DynamicLoaderWindowsDYLD::GetPluginName() {
   return GetPluginNameStatic();

Modified: lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Android/AdbClient.cpp Thu Nov 10 22:29:25 2016
@@ -381,7 +381,7 @@ Error AdbClient::internalShell(const cha
                    std::string(output_buf.begin(), output_buf.end()).c_str());
   }
 
-  return Error::success();
+  return Error();
 }
 
 Error AdbClient::Shell(const char *command, uint32_t timeout_ms,
@@ -412,7 +412,7 @@ Error AdbClient::ShellToFile(const char
   dst.close();
   if (!dst)
     return Error("Failed to write file %s", output_filename.c_str());
-  return Error::success();
+  return Error();
 }
 
 std::unique_ptr<AdbClient::SyncService>
@@ -536,7 +536,7 @@ Error AdbClient::SyncService::internalSt
   mode = extractor.GetU32(&offset);
   size = extractor.GetU32(&offset);
   mtime = extractor.GetU32(&offset);
-  return Error::success();
+  return Error();
 }
 
 Error AdbClient::SyncService::PullFile(const FileSpec &remote_file,
@@ -641,7 +641,7 @@ Error AdbClient::SyncService::PullFileCh
   } else
     return Error("Pull failed with unknown response: %s", response_id.c_str());
 
-  return Error::success();
+  return Error();
 }
 
 Error AdbClient::SyncService::ReadAllBytes(void *buffer, size_t size) {

Modified: lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp Thu Nov 10 22:29:25 2016
@@ -252,7 +252,7 @@ Error PlatformFreeBSD::GetFileWithUUID(c
 
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Kalimba/PlatformKalimba.cpp Thu Nov 10 22:29:25 2016
@@ -179,7 +179,7 @@ Error PlatformKalimba::ResolveExecutable
 Error PlatformKalimba::GetFileWithUUID(const FileSpec & /*platform_file*/,
                                        const UUID * /*uuid_ptr*/,
                                        FileSpec & /*local_file*/) {
-  return Error::success();
+  return Error();
 }
 
 //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Linux/PlatformLinux.cpp Thu Nov 10 22:29:25 2016
@@ -341,7 +341,7 @@ Error PlatformLinux::GetFileWithUUID(con
 
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformAppleSimulator.cpp Thu Nov 10 22:29:25 2016
@@ -71,7 +71,7 @@ lldb_private::Error PlatformAppleSimulat
 
   if (spawned) {
     launch_info.SetProcessID(spawned.GetPID());
-    return Error::success();
+    return Error();
   } else
     return spawned.GetError();
 #else
@@ -164,7 +164,7 @@ Error PlatformAppleSimulator::ConnectRem
 Error PlatformAppleSimulator::DisconnectRemote() {
 #if defined(__APPLE__)
   m_device.reset();
-  return Error::success();
+  return Error();
 #else
   Error err;
   err.SetErrorString(UNSUPPORTED_ERROR);

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Thu Nov 10 22:29:25 2016
@@ -393,7 +393,7 @@ lldb_private::Error PlatformDarwin::GetS
                                 module_spec.GetArchitecture());
           module_sp.reset(new Module(local_spec));
           module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
-          return Error::success();
+          return Error();
         }
       }
 
@@ -433,7 +433,7 @@ lldb_private::Error PlatformDarwin::GetS
                       (IsHost() ? "host" : "remote"),
                       module_spec.GetFileSpec().GetDirectory().AsCString(),
                       module_spec.GetFileSpec().GetFilename().AsCString());
-        return Error::success();
+        return Error();
       }
 
       // bring in the remote module file
@@ -455,7 +455,7 @@ lldb_private::Error PlatformDarwin::GetS
         ModuleSpec local_spec(module_cache_spec, module_spec.GetArchitecture());
         module_sp.reset(new Module(local_spec));
         module_sp->SetPlatformFileSpec(module_spec.GetFileSpec());
-        return Error::success();
+        return Error();
       } else
         return Error("unable to obtain valid module file");
     } else

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformMacOSX.cpp Thu Nov 10 22:29:25 2016
@@ -247,7 +247,7 @@ Error PlatformMacOSX::GetSymbolFile(cons
 
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 lldb_private::Error
@@ -264,7 +264,7 @@ PlatformMacOSX::GetFileWithUUID(const ll
     if (local_os_build.compare(remote_os_build) == 0) {
       // same OS version: the local file is good enough
       local_file = platform_file;
-      return Error::success();
+      return Error();
     } else {
       // try to find the file in the cache
       std::string cache_path(GetLocalCacheDirectory());
@@ -273,7 +273,7 @@ PlatformMacOSX::GetFileWithUUID(const ll
       FileSpec module_cache_spec(cache_path, false);
       if (module_cache_spec.Exists()) {
         local_file = module_cache_spec;
-        return Error::success();
+        return Error();
       }
       // bring in the remote module file
       FileSpec module_cache_folder =
@@ -288,13 +288,13 @@ PlatformMacOSX::GetFileWithUUID(const ll
         return err;
       if (module_cache_spec.Exists()) {
         local_file = module_cache_spec;
-        return Error::success();
+        return Error();
       } else
         return Error("unable to obtain valid module file");
     }
   }
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 bool PlatformMacOSX::GetSupportedArchitectureAtIndex(uint32_t idx,

Modified: lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp Thu Nov 10 22:29:25 2016
@@ -244,7 +244,7 @@ Error PlatformNetBSD::GetFileWithUUID(co
 
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 //------------------------------------------------------------------

Modified: lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp Thu Nov 10 22:29:25 2016
@@ -207,7 +207,7 @@ PlatformPOSIX::PutFile(const lldb_privat
 
   if (IsHost()) {
     if (FileSpec::Equal(source, destination, true))
-      return Error::success();
+      return Error();
     // cp src dst
     // chown uid:gid dst
     std::string src_path(source.GetPath());
@@ -223,10 +223,10 @@ PlatformPOSIX::PutFile(const lldb_privat
     if (status != 0)
       return Error("unable to perform copy");
     if (uid == UINT32_MAX && gid == UINT32_MAX)
-      return Error::success();
+      return Error();
     if (chown_file(this, dst_path.c_str(), uid, gid) != 0)
       return Error("unable to perform chown");
-    return Error::success();
+    return Error();
   } else if (m_remote_platform_sp) {
     if (GetSupportsRSync()) {
       std::string src_path(source.GetPath());
@@ -254,7 +254,7 @@ PlatformPOSIX::PutFile(const lldb_privat
         // Don't chown a local file for a remote system
         //                if (chown_file(this,dst_path.c_str(),uid,gid) != 0)
         //                    return Error("unable to perform chown");
-        return Error::success();
+        return Error();
       }
       // if we are still here rsync has failed - let's try the slow way before
       // giving up
@@ -323,7 +323,7 @@ lldb_private::Error PlatformPOSIX::GetFi
     RunShellCommand(cp_command.GetData(), NULL, &status, NULL, NULL, 10);
     if (status != 0)
       return Error("unable to perform copy");
-    return Error::success();
+    return Error();
   } else if (m_remote_platform_sp) {
     if (GetSupportsRSync()) {
       StreamString command;
@@ -343,7 +343,7 @@ lldb_private::Error PlatformPOSIX::GetFi
       int retcode;
       Host::RunShellCommand(command.GetData(), NULL, &retcode, NULL, NULL, 60);
       if (retcode == 0)
-        return Error::success();
+        return Error();
       // If we are here, rsync has failed - let's try the slow way before giving
       // up
     }
@@ -745,7 +745,7 @@ Error PlatformPOSIX::EvaluateLibdlExpres
 
   if (result_valobj_sp->GetError().Fail())
     return result_valobj_sp->GetError();
-  return Error::success();
+  return Error();
 }
 
 uint32_t PlatformPOSIX::DoLoadImage(lldb_private::Process *process,
@@ -833,7 +833,7 @@ Error PlatformPOSIX::UnloadImage(lldb_pr
       return Error("expression failed: \"%s\"", expr.GetData());
     process->ResetImageToken(image_token);
   }
-  return Error::success();
+  return Error();
 }
 
 lldb::ProcessSP PlatformPOSIX::ConnectProcess(const char *connect_url,

Modified: lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/Windows/PlatformWindows.cpp Thu Nov 10 22:29:25 2016
@@ -527,7 +527,7 @@ Error PlatformWindows::GetFileWithUUID(c
 
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 Error PlatformWindows::GetSharedModule(

Modified: lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp Thu Nov 10 22:29:25 2016
@@ -196,7 +196,7 @@ Error PlatformRemoteGDBServer::GetFileWi
                                                FileSpec &local_file) {
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 //------------------------------------------------------------------
@@ -482,7 +482,7 @@ Error PlatformRemoteGDBServer::LaunchPro
 Error PlatformRemoteGDBServer::KillProcess(const lldb::pid_t pid) {
   if (!KillSpawnedProcess(pid))
     return Error("failed to kill remote spawned process");
-  return Error::success();
+  return Error();
 }
 
 lldb::ProcessSP PlatformRemoteGDBServer::DebugProcess(

Modified: lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp (original)
+++ lldb/trunk/source/Plugins/Process/MacOSX-Kernel/ProcessKDP.cpp Thu Nov 10 22:29:25 2016
@@ -414,7 +414,7 @@ lldb_private::DynamicLoader *ProcessKDP:
   return m_dyld_ap.get();
 }
 
-Error ProcessKDP::WillResume() { return Error::success(); }
+Error ProcessKDP::WillResume() { return Error(); }
 
 Error ProcessKDP::DoResume() {
   Error error;

Modified: lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/elf-core/ProcessElfCore.cpp Thu Nov 10 22:29:25 2016
@@ -258,7 +258,7 @@ bool ProcessElfCore::UpdateThreadList(Th
 
 void ProcessElfCore::RefreshStateAfterStop() {}
 
-Error ProcessElfCore::DoDestroy() { return Error::success(); }
+Error ProcessElfCore::DoDestroy() { return Error(); }
 
 //------------------------------------------------------------------
 // Process Queries
@@ -304,7 +304,7 @@ Error ProcessElfCore::GetMemoryRegionInf
       region_info.SetExecutable(MemoryRegionInfo::eNo);
       region_info.SetMapped(MemoryRegionInfo::eNo);
     }
-    return Error::success();
+    return Error();
   }
 
   region_info.GetRange().SetRangeBase(load_addr);
@@ -313,7 +313,7 @@ Error ProcessElfCore::GetMemoryRegionInf
   region_info.SetWritable(MemoryRegionInfo::eNo);
   region_info.SetExecutable(MemoryRegionInfo::eNo);
   region_info.SetMapped(MemoryRegionInfo::eNo);
-  return Error::success();
+  return Error();
 }
 
 size_t ProcessElfCore::DoReadMemory(lldb::addr_t addr, void *buf, size_t size,

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp Thu Nov 10 22:29:25 2016
@@ -2672,7 +2672,7 @@ lldb_private::Error GDBRemoteCommunicati
     response.GetEscapedBinaryData(output);
     if (command_output)
       command_output->assign(output);
-    return Error::success();
+    return Error();
   }
   return Error("unable to send packet");
 }

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp Thu Nov 10 22:29:25 2016
@@ -197,13 +197,13 @@ Error GDBRemoteCommunicationServerLLGS::
                  __FUNCTION__);
 
   m_process_launch_info.SetArguments(const_cast<const char **>(args), true);
-  return Error::success();
+  return Error();
 }
 
 Error GDBRemoteCommunicationServerLLGS::SetLaunchFlags(
     unsigned int launch_flags) {
   m_process_launch_info.GetFlags().Set(launch_flags);
-  return Error::success();
+  return Error();
 }
 
 Error GDBRemoteCommunicationServerLLGS::LaunchProcess() {
@@ -988,7 +988,7 @@ Error GDBRemoteCommunicationServerLLGS::
     return error;
   }
 
-  return Error::success();
+  return Error();
 }
 
 void GDBRemoteCommunicationServerLLGS::StartSTDIOForwarding() {

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Thu Nov 10 22:29:25 2016
@@ -1252,7 +1252,7 @@ Error ProcessGDBRemote::WillResume() {
   m_continue_S_tids.clear();
   m_jstopinfo_sp.reset();
   m_jthreadsinfo_sp.reset();
-  return Error::success();
+  return Error();
 }
 
 Error ProcessGDBRemote::DoResume() {
@@ -3246,7 +3246,7 @@ Error ProcessGDBRemote::EstablishConnect
     const ProcessInfo &process_info) {
   // Make sure we aren't already connected?
   if (m_gdb_comm.IsConnected())
-    return Error::success();
+    return Error();
 
   PlatformSP platform_sp(GetTarget().GetPlatform());
   if (platform_sp && !platform_sp->IsHost())
@@ -4408,7 +4408,7 @@ Error ProcessGDBRemote::GetLoadedModuleL
 
     XMLNode root_element = doc.GetRootElement("library-list-svr4");
     if (!root_element)
-      return Error::success();
+      return Error();
 
     // main link map structure
     llvm::StringRef main_lm = root_element.GetAttributeValue("main-lm");
@@ -4494,7 +4494,7 @@ Error ProcessGDBRemote::GetLoadedModuleL
 
     XMLNode root_element = doc.GetRootElement("library-list");
     if (!root_element)
-      return Error::success();
+      return Error();
 
     root_element.ForEachChildElementWithName(
         "library", [log, &list](const XMLNode &library) -> bool {
@@ -4538,7 +4538,7 @@ Error ProcessGDBRemote::GetLoadedModuleL
     return Error(0, ErrorType::eErrorTypeGeneric);
   }
 
-  return Error::success();
+  return Error();
 }
 
 lldb::ModuleSP ProcessGDBRemote::LoadModuleAtAddress(const FileSpec &file,
@@ -4662,7 +4662,7 @@ Error ProcessGDBRemote::GetFileLoadAddre
       // The file is not loaded into the inferior
       is_loaded = false;
       load_addr = LLDB_INVALID_ADDRESS;
-      return Error::success();
+      return Error();
     }
 
     return Error(
@@ -4672,7 +4672,7 @@ Error ProcessGDBRemote::GetFileLoadAddre
   if (response.IsNormalResponse()) {
     is_loaded = true;
     load_addr = response.GetHexMaxU64(false, LLDB_INVALID_ADDRESS);
-    return Error::success();
+    return Error();
   }
 
   return Error("Unknown error happened during sending the load address packet");

Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Thu Nov 10 22:29:25 2016
@@ -461,7 +461,7 @@ void ProcessMachCore::RefreshStateAfterS
   // SetThreadStopInfo (m_last_stop_packet);
 }
 
-Error ProcessMachCore::DoDestroy() { return Error::success(); }
+Error ProcessMachCore::DoDestroy() { return Error(); }
 
 //------------------------------------------------------------------
 // Process Queries
@@ -564,7 +564,7 @@ Error ProcessMachCore::GetMemoryRegionIn
       region_info.SetExecutable(MemoryRegionInfo::eNo);
       region_info.SetMapped(MemoryRegionInfo::eNo);
     }
-    return Error::success();
+    return Error();
   }
 
   region_info.GetRange().SetRangeBase(load_addr);
@@ -573,7 +573,7 @@ Error ProcessMachCore::GetMemoryRegionIn
   region_info.SetWritable(MemoryRegionInfo::eNo);
   region_info.SetExecutable(MemoryRegionInfo::eNo);
   region_info.SetMapped(MemoryRegionInfo::eNo);
-  return Error::success();
+  return Error();
 }
 
 void ProcessMachCore::Clear() { m_thread_list.Clear(); }

Modified: lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp (original)
+++ lldb/trunk/source/Plugins/Process/minidump/ProcessMinidump.cpp Thu Nov 10 22:29:25 2016
@@ -133,7 +133,7 @@ ConstString ProcessMinidump::GetPluginNa
 
 uint32_t ProcessMinidump::GetPluginVersion() { return 1; }
 
-Error ProcessMinidump::DoDestroy() { return Error::success(); }
+Error ProcessMinidump::DoDestroy() { return Error(); }
 
 void ProcessMinidump::RefreshStateAfterStop() {
   if (!m_active_exception)

Modified: lldb/trunk/source/Target/Platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Platform.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Target/Platform.cpp (original)
+++ lldb/trunk/source/Target/Platform.cpp Thu Nov 10 22:29:25 2016
@@ -172,7 +172,7 @@ Error Platform::GetFileWithUUID(const Fi
                                 const UUID *uuid_ptr, FileSpec &local_file) {
   // Default to the local case
   local_file = platform_file;
-  return Error::success();
+  return Error();
 }
 
 FileSpecList
@@ -1089,7 +1089,7 @@ Error Platform::KillProcess(const lldb::
         "they are controlled by a process plugin");
   }
   Host::Kill(pid, SIGTERM);
-  return Error::success();
+  return Error();
 }
 
 lldb::ProcessSP
@@ -1597,7 +1597,7 @@ Error Platform::GetRemoteSharedModule(co
   const auto error = module_resolver(resolved_module_spec);
   if (error.Fail()) {
     if (GetCachedSharedModule(resolved_module_spec, module_sp, did_create_ptr))
-      return Error::success();
+      return Error();
   }
 
   return error;

Modified: lldb/trunk/source/Target/Process.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Process.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Target/Process.cpp (original)
+++ lldb/trunk/source/Target/Process.cpp Thu Nov 10 22:29:25 2016
@@ -3359,7 +3359,7 @@ Error Process::Halt(bool clear_thread_pl
     RestoreProcessEvents();
     SetExitStatus(SIGKILL, "Cancelled async attach.");
     Destroy(false);
-    return Error::success();
+    return Error();
   }
 
   // Wait for 10 second for the process to stop.
@@ -3375,7 +3375,7 @@ Error Process::Halt(bool clear_thread_pl
 
   BroadcastEvent(event_sp);
 
-  return Error::success();
+  return Error();
 }
 
 Error Process::StopForDestroyOrDetach(lldb::EventSP &exit_event_sp) {

Modified: lldb/trunk/source/Target/Thread.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/Thread.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Target/Thread.cpp (original)
+++ lldb/trunk/source/Target/Thread.cpp Thu Nov 10 22:29:25 2016
@@ -1766,7 +1766,7 @@ Error Thread::JumpToLine(const FileSpec
   if (!reg_ctx->SetPC(dest))
     return Error("Cannot change PC to target address.");
 
-  return Error::success();
+  return Error();
 }
 
 void Thread::DumpUsingSettingsFormat(Stream &strm, uint32_t frame_idx,

Modified: lldb/trunk/source/Utility/ModuleCache.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ModuleCache.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/source/Utility/ModuleCache.cpp (original)
+++ lldb/trunk/source/Utility/ModuleCache.cpp Thu Nov 10 22:29:25 2016
@@ -70,7 +70,7 @@ Error MakeDirectory(const FileSpec &dir_
     if (!dir_path.IsDirectory())
       return Error("Invalid existing path");
 
-    return Error::success();
+    return Error();
   }
 
   return FileSystem::MakeDirectory(dir_path, eFilePermissionsDirectoryDefault);
@@ -141,7 +141,7 @@ Error CreateHostSysRootModuleLink(const
                platform_module_spec.GetPath().c_str());
   if (sysroot_module_path_spec.Exists()) {
     if (!delete_existing)
-      return Error::success();
+      return Error();
 
     DecrementRefExistingModule(root_dir_spec, sysroot_module_path_spec);
   }
@@ -210,7 +210,7 @@ Error ModuleCache::Put(const FileSpec &r
   if (error.Fail())
     return Error("Failed to create link to %s: %s",
                  module_file_path.GetPath().c_str(), error.AsCString());
-  return Error::success();
+  return Error();
 }
 
 Error ModuleCache::Get(const FileSpec &root_dir_spec, const char *hostname,
@@ -221,7 +221,7 @@ Error ModuleCache::Get(const FileSpec &r
   if (find_it != m_loaded_modules.end()) {
     cached_module_sp = (*find_it).second.lock();
     if (cached_module_sp)
-      return Error::success();
+      return Error();
     m_loaded_modules.erase(find_it);
   }
 
@@ -263,7 +263,7 @@ Error ModuleCache::Get(const FileSpec &r
   m_loaded_modules.insert(
       std::make_pair(module_spec.GetUUID().GetAsString(), cached_module_sp));
 
-  return Error::success();
+  return Error();
 }
 
 Error ModuleCache::GetAndPut(const FileSpec &root_dir_spec,
@@ -320,7 +320,7 @@ Error ModuleCache::GetAndPut(const FileS
     // module might
     // contain the necessary symbols and the debugging is also possible without
     // a symfile.
-    return Error::success();
+    return Error();
 
   error = Put(root_dir_spec, escaped_hostname.c_str(), module_spec,
               tmp_download_sym_file_spec,
@@ -332,5 +332,5 @@ Error ModuleCache::GetAndPut(const FileS
 
   FileSpec symfile_spec = GetSymbolFileSpec(cached_module_sp->GetFileSpec());
   cached_module_sp->SetSymbolFileFileSpec(symfile_spec);
-  return Error::success();
+  return Error();
 }

Modified: lldb/trunk/tools/lldb-server/lldb-platform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-server/lldb-platform.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-server/lldb-platform.cpp (original)
+++ lldb/trunk/tools/lldb-server/lldb-platform.cpp Thu Nov 10 22:29:25 2016
@@ -130,7 +130,7 @@ static Error save_socket_id_to_file(cons
                  file_spec.GetPath().c_str(), err_code.message().c_str());
 
   tmp_file_remover.releaseFile();
-  return Error::success();
+  return Error();
 }
 
 //----------------------------------------------------------------------

Modified: lldb/trunk/unittests/Utility/ModuleCacheTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ModuleCacheTest.cpp?rev=286562&r1=286561&r2=286562&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/ModuleCacheTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ModuleCacheTest.cpp Thu Nov 10 22:29:25 2016
@@ -114,7 +114,7 @@ void ModuleCacheTest::TryGetAndPut(const
         std::error_code ec = llvm::sys::fs::copy_file(
             s_test_executable, tmp_download_file_spec.GetCString());
         EXPECT_FALSE(ec);
-        return Error::success();
+        return Error();
       },
       [](const ModuleSP &module_sp, const FileSpec &tmp_download_file_spec) {
         return Error("Not supported.");




More information about the lldb-commits mailing list