[Lldb-commits] [lldb] [lldb] Remove unused Status::SetMachError (NFC) (PR #72668)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 17 07:41:42 PST 2023
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/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.
>From b17285071edca2b1d74fb5138489deb21ab93ec9 Mon Sep 17 00:00:00 2001
From: Jonas Devlieghere <jonas at devlieghere.com>
Date: Fri, 17 Nov 2023 07:39:52 -0800
Subject: [PATCH] [lldb] Remove unused Status::SetMachError (NFC)
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.
---
lldb/include/lldb/Utility/Status.h | 9 ---------
lldb/source/Utility/Status.cpp | 8 --------
2 files changed, 17 deletions(-)
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