[Lldb-commits] [lldb] [lldb] Change the implementation of Status to store an llvm::Error (NFC) (PR #106774)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 5 02:29:27 PDT 2024
================
@@ -170,12 +215,8 @@ class Status {
bool Success() const;
protected:
- Status(llvm::Error error);
- /// Status code as an integer value.
- ValueType m_code = 0;
- /// The type of the above error code.
- lldb::ErrorType m_type = lldb::eErrorTypeInvalid;
- /// A string representation of the error code.
+ Status(llvm::Error error) : m_error(std::move(error)) {}
+ mutable llvm::Error m_error;
----------------
labath wrote:
Any chance to avoid the mutable thing? This sort of means that accessing the object (even const methods) from multiple threads may not be thread-safe. I guess that sort of already was a problem with the m_string thingy, but I expect it to be more pronounced now.
https://github.com/llvm/llvm-project/pull/106774
More information about the lldb-commits
mailing list