labath created this revision.

It is not presently used, and it's quite dangerous to use -- it assumes the
integer is an osx kern_return_t, but very few of the integers we have lying
around are mach kernel error codes. The error can still be used to a
mach error using a slightly longer (but more explicit) syntax.


https://reviews.llvm.org/D35305

Files:
  include/lldb/Utility/Status.h
  source/Utility/Status.cpp


Index: source/Utility/Status.cpp
===================================================================
--- source/Utility/Status.cpp
+++ source/Utility/Status.cpp
@@ -104,16 +104,6 @@
   return *this;
 }
 
-//----------------------------------------------------------------------
-// Assignment operator
-//----------------------------------------------------------------------
-const Status &Status::operator=(uint32_t err) {
-  m_code = err;
-  m_type = eErrorTypeMachKernel;
-  m_string.clear();
-  return *this;
-}
-
 Status::~Status() = default;
 
 //----------------------------------------------------------------------
Index: include/lldb/Utility/Status.h
===================================================================
--- include/lldb/Utility/Status.h
+++ include/lldb/Utility/Status.h
@@ -88,19 +88,6 @@
   //------------------------------------------------------------------
   const Status &operator=(const Status &rhs);
 
-  //------------------------------------------------------------------
-  /// Assignment operator from a kern_return_t.
-  ///
-  /// Sets the type to \c MachKernel and the error code to \a err.
-  ///
-  /// @param[in] err
-  ///     A mach error code.
-  ///
-  /// @return
-  ///     A const reference to this object.
-  //------------------------------------------------------------------
-  const Status &operator=(uint32_t err);
-
   ~Status();
 
   // llvm::Error support


Index: source/Utility/Status.cpp
===================================================================
--- source/Utility/Status.cpp
+++ source/Utility/Status.cpp
@@ -104,16 +104,6 @@
   return *this;
 }
 
-//----------------------------------------------------------------------
-// Assignment operator
-//----------------------------------------------------------------------
-const Status &Status::operator=(uint32_t err) {
-  m_code = err;
-  m_type = eErrorTypeMachKernel;
-  m_string.clear();
-  return *this;
-}
-
 Status::~Status() = default;
 
 //----------------------------------------------------------------------
Index: include/lldb/Utility/Status.h
===================================================================
--- include/lldb/Utility/Status.h
+++ include/lldb/Utility/Status.h
@@ -88,19 +88,6 @@
   //------------------------------------------------------------------
   const Status &operator=(const Status &rhs);
 
-  //------------------------------------------------------------------
-  /// Assignment operator from a kern_return_t.
-  ///
-  /// Sets the type to \c MachKernel and the error code to \a err.
-  ///
-  /// @param[in] err
-  ///     A mach error code.
-  ///
-  /// @return
-  ///     A const reference to this object.
-  //------------------------------------------------------------------
-  const Status &operator=(uint32_t err);
-
   ~Status();
 
   // llvm::Error support
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to