[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
================
@@ -26,6 +26,52 @@ class raw_ostream;
namespace lldb_private {
+/// Going a bit against the spirit of llvm::Error,
+/// lldb_private::Status need to store errors long-term and sometimes
+/// copy them. This base class defines an interface for this
+/// operation.
+class CloneableError
+ : public llvm::ErrorInfo<CloneableError, llvm::StringError> {
----------------
labath wrote:
I think it'd be better if this inherited from ErrorInfoBase. StringError provides the ability to store the error as a string, but I don't think that's strictly required for all subclasses. (If a particular subclass want that ability, it can always add it itself, and I think it'd be slightly weird to say that e.g. MachKernelError "is a" StringError)
https://github.com/llvm/llvm-project/pull/106774
More information about the lldb-commits
mailing list