[Lldb-commits] [lldb] [lldb] Turn lldb_private::Status into a value type. (PR #106163)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 27 03:09:54 PDT 2024
================
@@ -51,13 +51,13 @@ Status::Status(std::error_code EC)
: eErrorTypeGeneric),
m_string(EC.message()) {}
-Status::Status(const char *format, ...) : m_string() {
- va_list args;
- va_start(args, format);
- SetErrorToGenericError();
- SetErrorStringWithVarArg(format, args);
- va_end(args);
-}
+Status::Status(std::string &&err_str)
+ : m_code(LLDB_GENERIC_ERROR), m_type(eErrorTypeGeneric),
+ m_string(std::move(err_str)) {}
+
+Status::Status(llvm::StringRef err_str)
----------------
Michael137 wrote:
Do we need this constructor?
https://github.com/llvm/llvm-project/pull/106163
More information about the lldb-commits
mailing list