[Lldb-commits] [lldb] [lldb] Remove unused Status::SetMachError (NFC) (PR #72668)
via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 17 07:42:13 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: Jonas Devlieghere (JDevlieghere)
<details>
<summary>Changes</summary>
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.
---
Full diff: https://github.com/llvm/llvm-project/pull/72668.diff
2 Files Affected:
- (modified) lldb/include/lldb/Utility/Status.h (-9)
- (modified) lldb/source/Utility/Status.cpp (-8)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/72668
More information about the lldb-commits
mailing list