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));
}
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));
}
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits