[Lldb-commits] [lldb] 94ce378 - [lldb] Remove unused Status::SetMachError (NFC) (#72668)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 17 10:17:52 PST 2023
Author: Jonas Devlieghere
Date: 2023-11-17T10:17:48-08:00
New Revision: 94ce378ec051a120d640073b885fcd90f1cf10f8
URL: https://github.com/llvm/llvm-project/commit/94ce378ec051a120d640073b885fcd90f1cf10f8
DIFF: https://github.com/llvm/llvm-project/commit/94ce378ec051a120d640073b885fcd90f1cf10f8.diff
LOG: [lldb] Remove unused Status::SetMachError (NFC) (#72668)
This function is never used, neither here nor downstream in the Swift
fork. As far as I can tell, the same is true for the corresponding
eErrorTypeMachKernel but as that's part of the SB API we cannot remove
that.
Added:
Modified:
lldb/include/lldb/Utility/Status.h
lldb/source/Utility/Status.cpp
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h
index ac410552438e0c6..fa5768141fa45df 100644
--- a/lldb/include/lldb/Utility/Status.h
+++ b/lldb/include/lldb/Utility/Status.h
@@ -114,15 +114,6 @@ class Status {
/// The error type enumeration value.
lldb::ErrorType GetType() const;
- /// Set accessor from a kern_return_t.
- ///
- /// Set accessor for the error value to \a err and the error type to \c
- /// MachKernel.
- ///
- /// \param[in] err
- /// A mach error code.
- void SetMachError(uint32_t err);
-
void SetExpressionError(lldb::ExpressionResults, const char *mssg);
int SetExpressionErrorWithFormat(lldb::ExpressionResults, const char *format,
diff --git a/lldb/source/Utility/Status.cpp b/lldb/source/Utility/Status.cpp
index 4498961d83e7712..3bd00bb20da258c 100644
--- a/lldb/source/Utility/Status.cpp
+++ b/lldb/source/Utility/Status.cpp
@@ -180,14 +180,6 @@ ErrorType Status::GetType() const { return m_type; }
// otherwise non-success result.
bool Status::Fail() const { return m_code != 0; }
-// Set accessor for the error value to "err" and the type to
-// "eErrorTypeMachKernel"
-void Status::SetMachError(uint32_t err) {
- m_code = err;
- m_type = eErrorTypeMachKernel;
- m_string.clear();
-}
-
void Status::SetExpressionError(lldb::ExpressionResults result,
const char *mssg) {
m_code = result;
More information about the lldb-commits
mailing list