[Lldb-commits] [PATCH] D104778: [lldb] Remove asserts in CommandReturnObject SetError and AppendError

David Spickett via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 23 06:11:22 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfe63db25bcc0: [lldb] Remove asserts in CommandReturnObject SetError and AppendError (authored by DavidSpickett).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104778/new/

https://reviews.llvm.org/D104778

Files:
  lldb/source/Interpreter/CommandReturnObject.cpp


Index: lldb/source/Interpreter/CommandReturnObject.cpp
===================================================================
--- lldb/source/Interpreter/CommandReturnObject.cpp
+++ lldb/source/Interpreter/CommandReturnObject.cpp
@@ -99,13 +99,13 @@
 
 void CommandReturnObject::AppendError(llvm::StringRef in_string) {
   SetStatus(eReturnStatusFailed);
-  assert(!in_string.empty() && "Expected a non-empty error message");
+  if (in_string.empty())
+    return;
   error(GetErrorStream()) << in_string.rtrim() << '\n';
 }
 
 void CommandReturnObject::SetError(const Status &error,
                                    const char *fallback_error_cstr) {
-  assert(error.Fail() && "Expected a failed Status");
   AppendError(error.AsCString(fallback_error_cstr));
 }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104778.353942.patch
Type: text/x-patch
Size: 766 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210623/655c1fa6/attachment.bin>


More information about the lldb-commits mailing list