[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)

Med Ismail Bennani via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 30 17:19:15 PDT 2024


================
@@ -96,16 +128,49 @@ Status Status::FromErrorStringWithFormat(const char *format, ...) {
   return Status(string);
 }
 
-llvm::Error Status::ToError() const {
-  if (Success())
+Status Status::FromExpressionError(lldb::ExpressionResults result,
+                                   std::string msg) {
+  return Status(llvm::make_error<ExpressionError>(
+      std::error_code(result, expression_category()), msg));
+}
+
+/// Creates a deep copy of all known errors and converts all other
+/// errors to a new llvm::StringError.
+static llvm::Error cloneError(llvm::Error &error) {
----------------
medismailben wrote:

nit: why isn't this starting with a capital letter like the other methods (camelCase vs. PascalCase) ?

https://github.com/llvm/llvm-project/pull/106774


More information about the lldb-commits mailing list