aboutsummaryrefslogtreecommitdiffstats
path: root/include/lldb/Utility/Status.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Utility/Status.h')
-rw-r--r--include/lldb/Utility/Status.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/include/lldb/Utility/Status.h b/include/lldb/Utility/Status.h
index ae730b90dffe..e6a0a8e7fce1 100644
--- a/include/lldb/Utility/Status.h
+++ b/include/lldb/Utility/Status.h
@@ -47,8 +47,8 @@ public:
/// into ValueType.
typedef uint32_t ValueType;
- /// Default constructor.
- ///
+ Status();
+
/// Initialize the error object with a generic success value.
///
/// \param[in] err
@@ -56,23 +56,14 @@ public:
///
/// \param[in] type
/// The type for \a err.
- Status();
-
explicit Status(ValueType err,
lldb::ErrorType type = lldb::eErrorTypeGeneric);
- /* implicit */ Status(std::error_code EC);
+ Status(std::error_code EC);
explicit Status(const char *format, ...)
__attribute__((format(printf, 2, 3)));
- /// Assignment operator.
- ///
- /// \param[in] err
- /// An error code.
- ///
- /// \return
- /// A const reference to this object.
const Status &operator=(const Status &rhs);
~Status();
@@ -221,4 +212,11 @@ template <> struct format_provider<lldb_private::Status> {
};
}
+#define LLDB_ERRORF(status, fmt, ...) \
+ do { \
+ if (status) { \
+ (status)->SetErrorStringWithFormat((fmt), __VA_ARGS__); \
+ } \
+ } while (0);
+
#endif // #ifndef LLDB_UTILITY_STATUS_H