[Lldb-commits] [lldb] r360762 - Delete unnecessary copy ctors/copy assignment operators

Fangrui Song via lldb-commits lldb-commits at lists.llvm.org
Wed May 15 04:23:54 PDT 2019


Author: maskray
Date: Wed May 15 04:23:54 2019
New Revision: 360762

URL: http://llvm.org/viewvc/llvm-project?rev=360762&view=rev
Log:
Delete unnecessary copy ctors/copy assignment operators

It's the simplest and gives the cleanest semantics.

Modified:
    lldb/trunk/include/lldb/Core/ModuleChild.h
    lldb/trunk/include/lldb/Core/SearchFilter.h
    lldb/trunk/include/lldb/Core/ValueObjectList.h
    lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
    lldb/trunk/include/lldb/Expression/DWARFExpression.h
    lldb/trunk/include/lldb/Host/SocketAddress.h
    lldb/trunk/include/lldb/Symbol/SymbolContext.h
    lldb/trunk/include/lldb/Symbol/Type.h
    lldb/trunk/include/lldb/Target/ThreadSpec.h
    lldb/trunk/include/lldb/Utility/Broadcaster.h
    lldb/trunk/include/lldb/Utility/Status.h
    lldb/trunk/include/lldb/Utility/StringExtractor.h
    lldb/trunk/include/lldb/Utility/StringLexer.h
    lldb/trunk/source/Core/ModuleChild.cpp
    lldb/trunk/source/Core/SearchFilter.cpp
    lldb/trunk/source/Core/ValueObjectList.cpp
    lldb/trunk/source/DataFormatters/TypeSummary.cpp
    lldb/trunk/source/Expression/DWARFExpression.cpp
    lldb/trunk/source/Host/common/SocketAddress.cpp
    lldb/trunk/source/Symbol/SymbolContext.cpp
    lldb/trunk/source/Symbol/Type.cpp
    lldb/trunk/source/Target/ThreadSpec.cpp
    lldb/trunk/source/Utility/Broadcaster.cpp
    lldb/trunk/source/Utility/Status.cpp
    lldb/trunk/source/Utility/StringExtractor.cpp
    lldb/trunk/source/Utility/StringLexer.cpp
    lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp
    lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h
    lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp
    lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h

Modified: lldb/trunk/include/lldb/Core/ModuleChild.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleChild.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleChild.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleChild.h Wed May 15 04:23:54 2019
@@ -25,12 +25,6 @@ public:
   ///     class.
   ModuleChild(const lldb::ModuleSP &module_sp);
 
-  /// Copy constructor.
-  ///
-  /// \param[in] rhs
-  ///     A const ModuleChild class reference to copy.
-  ModuleChild(const ModuleChild &rhs);
-
   /// Destructor.
   ~ModuleChild();
 

Modified: lldb/trunk/include/lldb/Core/SearchFilter.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SearchFilter.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/SearchFilter.h (original)
+++ lldb/trunk/include/lldb/Core/SearchFilter.h Wed May 15 04:23:54 2019
@@ -88,14 +88,10 @@ public:
   ///    The Target that provides the module list to search.
   SearchFilter(const lldb::TargetSP &target_sp);
 
-  SearchFilter(const SearchFilter &rhs);
-
   SearchFilter(const lldb::TargetSP &target_sp, unsigned char filterType);
 
   virtual ~SearchFilter();
 
-  SearchFilter &operator=(const SearchFilter &rhs);
-
   /// Call this method with a file spec to see if that spec passes the filter.
   ///
   /// \param[in] spec
@@ -317,12 +313,8 @@ public:
   ///    The Module that limits the search.
   SearchFilterByModule(const lldb::TargetSP &targetSP, const FileSpec &module);
 
-  SearchFilterByModule(const SearchFilterByModule &rhs);
-
   ~SearchFilterByModule() override;
 
-  SearchFilterByModule &operator=(const SearchFilterByModule &rhs);
-
   bool ModulePasses(const lldb::ModuleSP &module_sp) override;
 
   bool ModulePasses(const FileSpec &spec) override;

Modified: lldb/trunk/include/lldb/Core/ValueObjectList.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ValueObjectList.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ValueObjectList.h (original)
+++ lldb/trunk/include/lldb/Core/ValueObjectList.h Wed May 15 04:23:54 2019
@@ -22,13 +22,6 @@ class ValueObject;
 // A collection of ValueObject values that
 class ValueObjectList {
 public:
-  // Constructors and Destructors
-  ValueObjectList();
-
-  ValueObjectList(const ValueObjectList &rhs);
-
-  ~ValueObjectList();
-
   const ValueObjectList &operator=(const ValueObjectList &rhs);
 
   void Append(const lldb::ValueObjectSP &val_obj_sp);

Modified: lldb/trunk/include/lldb/DataFormatters/TypeSummary.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/DataFormatters/TypeSummary.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/DataFormatters/TypeSummary.h (original)
+++ lldb/trunk/include/lldb/DataFormatters/TypeSummary.h Wed May 15 04:23:54 2019
@@ -26,12 +26,9 @@ namespace lldb_private {
 class TypeSummaryOptions {
 public:
   TypeSummaryOptions();
-  TypeSummaryOptions(const TypeSummaryOptions &rhs);
 
   ~TypeSummaryOptions() = default;
 
-  TypeSummaryOptions &operator=(const TypeSummaryOptions &rhs);
-
   lldb::LanguageType GetLanguage() const;
 
   lldb::TypeSummaryCapping GetCapping() const;

Modified: lldb/trunk/include/lldb/Expression/DWARFExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/DWARFExpression.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/DWARFExpression.h (original)
+++ lldb/trunk/include/lldb/Expression/DWARFExpression.h Wed May 15 04:23:54 2019
@@ -61,9 +61,6 @@ public:
                   DWARFUnit *dwarf_cu, lldb::offset_t data_offset,
                   lldb::offset_t data_length);
 
-  /// Copy constructor
-  DWARFExpression(const DWARFExpression &rhs);
-
   /// Destructor
   virtual ~DWARFExpression();
 

Modified: lldb/trunk/include/lldb/Host/SocketAddress.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/SocketAddress.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/SocketAddress.h (original)
+++ lldb/trunk/include/lldb/Host/SocketAddress.h Wed May 15 04:23:54 2019
@@ -45,7 +45,6 @@ public:
   SocketAddress(const struct sockaddr_in &s);
   SocketAddress(const struct sockaddr_in6 &s);
   SocketAddress(const struct sockaddr_storage &s);
-  SocketAddress(const SocketAddress &rhs);
   ~SocketAddress();
 
   // Operators

Modified: lldb/trunk/include/lldb/Symbol/SymbolContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/SymbolContext.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/SymbolContext.h (original)
+++ lldb/trunk/include/lldb/Symbol/SymbolContext.h Wed May 15 04:23:54 2019
@@ -82,14 +82,6 @@ public:
                          LineEntry *line_entry = nullptr,
                          Symbol *symbol = nullptr);
 
-  /// Copy constructor
-  ///
-  /// Makes a copy of the another SymbolContext object \a rhs.
-  ///
-  /// \param[in] rhs
-  ///     A const SymbolContext object reference to copy.
-  SymbolContext(const SymbolContext &rhs);
-
   ~SymbolContext();
 
   /// Assignment operator.

Modified: lldb/trunk/include/lldb/Symbol/Type.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/Type.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/Type.h (original)
+++ lldb/trunk/include/lldb/Symbol/Type.h Wed May 15 04:23:54 2019
@@ -102,10 +102,6 @@ public:
   // they get an error.
   Type();
 
-  Type(const Type &rhs);
-
-  const Type &operator=(const Type &rhs);
-
   void Dump(Stream *s, bool show_context);
 
   void DumpTypeName(Stream *s);
@@ -240,12 +236,10 @@ protected:
 
 class TypeImpl {
 public:
-  TypeImpl();
+  TypeImpl() = default;
 
   ~TypeImpl() {}
 
-  TypeImpl(const TypeImpl &rhs);
-
   TypeImpl(const lldb::TypeSP &type_sp);
 
   TypeImpl(const CompilerType &compiler_type);
@@ -262,8 +256,6 @@ public:
 
   void SetType(const CompilerType &compiler_type, const CompilerType &dynamic);
 
-  TypeImpl &operator=(const TypeImpl &rhs);
-
   bool operator==(const TypeImpl &rhs) const;
 
   bool operator!=(const TypeImpl &rhs) const;
@@ -481,9 +473,7 @@ public:
   TypeEnumMemberImpl(const lldb::TypeImplSP &integer_type_sp,
                      ConstString name, const llvm::APSInt &value);
 
-  TypeEnumMemberImpl(const TypeEnumMemberImpl &rhs)
-      : m_integer_type_sp(rhs.m_integer_type_sp), m_name(rhs.m_name),
-        m_value(rhs.m_value), m_valid(rhs.m_valid) {}
+  TypeEnumMemberImpl(const TypeEnumMemberImpl &rhs) = default;
 
   TypeEnumMemberImpl &operator=(const TypeEnumMemberImpl &rhs);
 

Modified: lldb/trunk/include/lldb/Target/ThreadSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ThreadSpec.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ThreadSpec.h (original)
+++ lldb/trunk/include/lldb/Target/ThreadSpec.h Wed May 15 04:23:54 2019
@@ -34,10 +34,6 @@ class ThreadSpec {
 public:
   ThreadSpec();
 
-  ThreadSpec(const ThreadSpec &rhs);
-
-  const ThreadSpec &operator=(const ThreadSpec &rhs);
-
   static std::unique_ptr<ThreadSpec>
   CreateFromStructuredData(const StructuredData::Dictionary &data_dict,
                            Status &error);

Modified: lldb/trunk/include/lldb/Utility/Broadcaster.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Broadcaster.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Broadcaster.h (original)
+++ lldb/trunk/include/lldb/Utility/Broadcaster.h Wed May 15 04:23:54 2019
@@ -42,8 +42,6 @@ public:
   BroadcastEventSpec(ConstString broadcaster_class, uint32_t event_bits)
       : m_broadcaster_class(broadcaster_class), m_event_bits(event_bits) {}
 
-  BroadcastEventSpec(const BroadcastEventSpec &rhs);
-
   ~BroadcastEventSpec() = default;
 
   ConstString GetBroadcasterClass() const { return m_broadcaster_class; }

Modified: lldb/trunk/include/lldb/Utility/Status.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Status.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/Status.h (original)
+++ lldb/trunk/include/lldb/Utility/Status.h Wed May 15 04:23:54 2019
@@ -66,7 +66,6 @@ public:
   explicit Status(const char *format, ...)
       __attribute__((format(printf, 2, 3)));
 
-  Status(const Status &rhs);
   /// Assignment operator.
   ///
   /// \param[in] err

Modified: lldb/trunk/include/lldb/Utility/StringExtractor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringExtractor.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringExtractor.h (original)
+++ lldb/trunk/include/lldb/Utility/StringExtractor.h Wed May 15 04:23:54 2019
@@ -23,12 +23,8 @@ public:
   StringExtractor();
   StringExtractor(llvm::StringRef packet_str);
   StringExtractor(const char *packet_cstr);
-  StringExtractor(const StringExtractor &rhs);
   virtual ~StringExtractor();
 
-  // Operators
-  const StringExtractor &operator=(const StringExtractor &rhs);
-
   void Reset(llvm::StringRef str) {
     m_packet = str;
     m_index = 0;

Modified: lldb/trunk/include/lldb/Utility/StringLexer.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/StringLexer.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/StringLexer.h (original)
+++ lldb/trunk/include/lldb/Utility/StringLexer.h Wed May 15 04:23:54 2019
@@ -24,8 +24,6 @@ public:
 
   StringLexer(std::string s);
 
-  StringLexer(const StringLexer &rhs);
-
   // These APIs are not bounds-checked.  Use HasAtLeast() if you're not sure.
   Character Peek();
 

Modified: lldb/trunk/source/Core/ModuleChild.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleChild.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleChild.cpp (original)
+++ lldb/trunk/source/Core/ModuleChild.cpp Wed May 15 04:23:54 2019
@@ -13,9 +13,6 @@ using namespace lldb_private;
 ModuleChild::ModuleChild(const lldb::ModuleSP &module_sp)
     : m_module_wp(module_sp) {}
 
-ModuleChild::ModuleChild(const ModuleChild &rhs)
-    : m_module_wp(rhs.m_module_wp) {}
-
 ModuleChild::~ModuleChild() {}
 
 const ModuleChild &ModuleChild::operator=(const ModuleChild &rhs) {

Modified: lldb/trunk/source/Core/SearchFilter.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Core/SearchFilter.cpp (original)
+++ lldb/trunk/source/Core/SearchFilter.cpp Wed May 15 04:23:54 2019
@@ -72,10 +72,6 @@ void Searcher::GetDescription(Stream *s)
 SearchFilter::SearchFilter(const TargetSP &target_sp, unsigned char filterType)
     : m_target_sp(target_sp), SubclassID(filterType) {}
 
-SearchFilter::SearchFilter(const SearchFilter &rhs) = default;
-
-SearchFilter &SearchFilter::operator=(const SearchFilter &rhs) = default;
-
 SearchFilter::~SearchFilter() = default;
 
 SearchFilterSP SearchFilter::CreateFromStructuredData(
@@ -404,16 +400,6 @@ SearchFilterByModule::SearchFilterByModu
                                            const FileSpec &module)
     : SearchFilter(target_sp, FilterTy::ByModule), m_module_spec(module) {}
 
-SearchFilterByModule::SearchFilterByModule(const SearchFilterByModule &rhs) =
-    default;
-
-SearchFilterByModule &SearchFilterByModule::
-operator=(const SearchFilterByModule &rhs) {
-  m_target_sp = rhs.m_target_sp;
-  m_module_spec = rhs.m_module_spec;
-  return *this;
-}
-
 SearchFilterByModule::~SearchFilterByModule() = default;
 
 bool SearchFilterByModule::ModulePasses(const ModuleSP &module_sp) {

Modified: lldb/trunk/source/Core/ValueObjectList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectList.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectList.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectList.cpp Wed May 15 04:23:54 2019
@@ -17,13 +17,6 @@
 using namespace lldb;
 using namespace lldb_private;
 
-ValueObjectList::ValueObjectList() : m_value_objects() {}
-
-ValueObjectList::ValueObjectList(const ValueObjectList &rhs)
-    : m_value_objects(rhs.m_value_objects) {}
-
-ValueObjectList::~ValueObjectList() {}
-
 const ValueObjectList &ValueObjectList::operator=(const ValueObjectList &rhs) {
   if (this != &rhs)
     m_value_objects = rhs.m_value_objects;

Modified: lldb/trunk/source/DataFormatters/TypeSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/TypeSummary.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/TypeSummary.cpp (original)
+++ lldb/trunk/source/DataFormatters/TypeSummary.cpp Wed May 15 04:23:54 2019
@@ -29,16 +29,6 @@ using namespace lldb_private;
 TypeSummaryOptions::TypeSummaryOptions()
     : m_lang(eLanguageTypeUnknown), m_capping(eTypeSummaryCapped) {}
 
-TypeSummaryOptions::TypeSummaryOptions(const TypeSummaryOptions &rhs)
-    : m_lang(rhs.m_lang), m_capping(rhs.m_capping) {}
-
-TypeSummaryOptions &TypeSummaryOptions::
-operator=(const TypeSummaryOptions &rhs) {
-  m_lang = rhs.m_lang;
-  m_capping = rhs.m_capping;
-  return *this;
-}
-
 lldb::LanguageType TypeSummaryOptions::GetLanguage() const { return m_lang; }
 
 lldb::TypeSummaryCapping TypeSummaryOptions::GetCapping() const {

Modified: lldb/trunk/source/Expression/DWARFExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/DWARFExpression.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Expression/DWARFExpression.cpp (original)
+++ lldb/trunk/source/Expression/DWARFExpression.cpp Wed May 15 04:23:54 2019
@@ -55,11 +55,6 @@ DWARFExpression::DWARFExpression(DWARFUn
     : m_module_wp(), m_data(), m_dwarf_cu(dwarf_cu),
       m_reg_kind(eRegisterKindDWARF), m_loclist_slide(LLDB_INVALID_ADDRESS) {}
 
-DWARFExpression::DWARFExpression(const DWARFExpression &rhs)
-    : m_module_wp(rhs.m_module_wp), m_data(rhs.m_data),
-      m_dwarf_cu(rhs.m_dwarf_cu), m_reg_kind(rhs.m_reg_kind),
-      m_loclist_slide(rhs.m_loclist_slide) {}
-
 DWARFExpression::DWARFExpression(lldb::ModuleSP module_sp,
                                  const DataExtractor &data,
                                  DWARFUnit *dwarf_cu,

Modified: lldb/trunk/source/Host/common/SocketAddress.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/SocketAddress.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/SocketAddress.cpp (original)
+++ lldb/trunk/source/Host/common/SocketAddress.cpp Wed May 15 04:23:54 2019
@@ -92,10 +92,6 @@ SocketAddress::SocketAddress(const struc
   *this = addr_info;
 }
 
-// SocketAddress copy constructor
-SocketAddress::SocketAddress(const SocketAddress &rhs)
-    : m_socket_addr(rhs.m_socket_addr) {}
-
 // Destructor
 SocketAddress::~SocketAddress() {}
 

Modified: lldb/trunk/source/Symbol/SymbolContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/SymbolContext.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/SymbolContext.cpp (original)
+++ lldb/trunk/source/Symbol/SymbolContext.cpp Wed May 15 04:23:54 2019
@@ -47,11 +47,6 @@ SymbolContext::SymbolContext(const Targe
     line_entry = *le;
 }
 
-SymbolContext::SymbolContext(const SymbolContext &rhs)
-    : target_sp(rhs.target_sp), module_sp(rhs.module_sp),
-      comp_unit(rhs.comp_unit), function(rhs.function), block(rhs.block),
-      line_entry(rhs.line_entry), symbol(rhs.symbol), variable(rhs.variable) {}
-
 SymbolContext::SymbolContext(SymbolContextScope *sc_scope)
     : target_sp(), module_sp(), comp_unit(nullptr), function(nullptr),
       block(nullptr), line_entry(), symbol(nullptr), variable(nullptr) {

Modified: lldb/trunk/source/Symbol/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/Type.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/Type.cpp (original)
+++ lldb/trunk/source/Symbol/Type.cpp Wed May 15 04:23:54 2019
@@ -138,15 +138,6 @@ Type::Type()
   m_flags.is_complete_objc_class = false;
 }
 
-Type::Type(const Type &rhs)
-    : std::enable_shared_from_this<Type>(rhs), UserID(rhs), m_name(rhs.m_name),
-      m_symbol_file(rhs.m_symbol_file), m_context(rhs.m_context),
-      m_encoding_type(rhs.m_encoding_type), m_encoding_uid(rhs.m_encoding_uid),
-      m_encoding_uid_type(rhs.m_encoding_uid_type),
-      m_byte_size(rhs.m_byte_size),
-      m_byte_size_has_value(rhs.m_byte_size_has_value), m_decl(rhs.m_decl),
-      m_compiler_type(rhs.m_compiler_type), m_flags(rhs.m_flags) {}
-
 void Type::GetDescription(Stream *s, lldb::DescriptionLevel level,
                           bool show_name) {
   *s << "id = " << (const UserID &)*this;
@@ -760,12 +751,6 @@ bool TypeAndOrName::HasCompilerType() co
   return m_compiler_type.IsValid();
 }
 
-TypeImpl::TypeImpl() : m_module_wp(), m_static_type(), m_dynamic_type() {}
-
-TypeImpl::TypeImpl(const TypeImpl &rhs)
-    : m_module_wp(rhs.m_module_wp), m_static_type(rhs.m_static_type),
-      m_dynamic_type(rhs.m_dynamic_type) {}
-
 TypeImpl::TypeImpl(const lldb::TypeSP &type_sp)
     : m_module_wp(), m_static_type(), m_dynamic_type() {
   SetType(type_sp);
@@ -815,15 +800,6 @@ void TypeImpl::SetType(const CompilerTyp
   m_dynamic_type = dynamic;
 }
 
-TypeImpl &TypeImpl::operator=(const TypeImpl &rhs) {
-  if (rhs != *this) {
-    m_module_wp = rhs.m_module_wp;
-    m_static_type = rhs.m_static_type;
-    m_dynamic_type = rhs.m_dynamic_type;
-  }
-  return *this;
-}
-
 bool TypeImpl::CheckModule(lldb::ModuleSP &module_sp) const {
   // Check if we have a module for this type. If we do and the shared pointer
   // is can be successfully initialized with m_module_wp, return true. Else

Modified: lldb/trunk/source/Target/ThreadSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadSpec.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadSpec.cpp (original)
+++ lldb/trunk/source/Target/ThreadSpec.cpp Wed May 15 04:23:54 2019
@@ -21,18 +21,6 @@ ThreadSpec::ThreadSpec()
     : m_index(UINT32_MAX), m_tid(LLDB_INVALID_THREAD_ID), m_name(),
       m_queue_name() {}
 
-ThreadSpec::ThreadSpec(const ThreadSpec &rhs)
-    : m_index(rhs.m_index), m_tid(rhs.m_tid), m_name(rhs.m_name),
-      m_queue_name(rhs.m_queue_name) {}
-
-const ThreadSpec &ThreadSpec::operator=(const ThreadSpec &rhs) {
-  m_index = rhs.m_index;
-  m_tid = rhs.m_tid;
-  m_name = rhs.m_name;
-  m_queue_name = rhs.m_queue_name;
-  return *this;
-}
-
 std::unique_ptr<ThreadSpec> ThreadSpec::CreateFromStructuredData(
     const StructuredData::Dictionary &spec_dict, Status &error) {
   uint32_t index = UINT32_MAX;

Modified: lldb/trunk/source/Utility/Broadcaster.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Broadcaster.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Utility/Broadcaster.cpp (original)
+++ lldb/trunk/source/Utility/Broadcaster.cpp Wed May 15 04:23:54 2019
@@ -316,8 +316,6 @@ ConstString &Broadcaster::GetBroadcaster
   return class_name;
 }
 
-BroadcastEventSpec::BroadcastEventSpec(const BroadcastEventSpec &rhs) = default;
-
 bool BroadcastEventSpec::operator<(const BroadcastEventSpec &rhs) const {
   if (GetBroadcasterClass() == rhs.GetBroadcasterClass()) {
     return GetEventBits() < rhs.GetEventBits();

Modified: lldb/trunk/source/Utility/Status.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Status.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Utility/Status.cpp (original)
+++ lldb/trunk/source/Utility/Status.cpp Wed May 15 04:23:54 2019
@@ -47,8 +47,6 @@ Status::Status(std::error_code EC)
     : m_code(EC.value()), m_type(ErrorType::eErrorTypeGeneric),
       m_string(EC.message()) {}
 
-Status::Status(const Status &rhs) = default;
-
 Status::Status(const char *format, ...)
     : m_code(0), m_type(eErrorTypeInvalid), m_string() {
   va_list args;

Modified: lldb/trunk/source/Utility/StringExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringExtractor.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringExtractor.cpp (original)
+++ lldb/trunk/source/Utility/StringExtractor.cpp Wed May 15 04:23:54 2019
@@ -38,19 +38,6 @@ StringExtractor::StringExtractor(const c
     m_packet.assign(packet_cstr);
 }
 
-// StringExtractor copy constructor
-StringExtractor::StringExtractor(const StringExtractor &rhs)
-    : m_packet(rhs.m_packet), m_index(rhs.m_index) {}
-
-// StringExtractor assignment operator
-const StringExtractor &StringExtractor::operator=(const StringExtractor &rhs) {
-  if (this != &rhs) {
-    m_packet = rhs.m_packet;
-    m_index = rhs.m_index;
-  }
-  return *this;
-}
-
 // Destructor
 StringExtractor::~StringExtractor() {}
 

Modified: lldb/trunk/source/Utility/StringLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/StringLexer.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/source/Utility/StringLexer.cpp (original)
+++ lldb/trunk/source/Utility/StringLexer.cpp Wed May 15 04:23:54 2019
@@ -15,9 +15,6 @@ using namespace lldb_utility;
 
 StringLexer::StringLexer(std::string s) : m_data(s), m_position(0) {}
 
-StringLexer::StringLexer(const StringLexer &rhs)
-    : m_data(rhs.m_data), m_position(rhs.m_position) {}
-
 StringLexer::Character StringLexer::Peek() { return m_data[m_position]; }
 
 bool StringLexer::NextIf(Character c) {

Modified: lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp (original)
+++ lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp Wed May 15 04:23:54 2019
@@ -13,11 +13,6 @@ using namespace ptdecoder;
 using namespace ptdecoder_private;
 
 // PTInstruction class member functions definitions
-PTInstruction::PTInstruction() : m_opaque_sp() {}
-
-PTInstruction::PTInstruction(const PTInstruction &insn)
-    : m_opaque_sp(insn.m_opaque_sp) {}
-
 PTInstruction::PTInstruction(
     const std::shared_ptr<ptdecoder_private::Instruction> &ptr)
     : m_opaque_sp(ptr) {}
@@ -41,13 +36,6 @@ bool PTInstruction::GetSpeculative() con
 }
 
 // PTInstructionList class member functions definitions
-PTInstructionList::PTInstructionList() : m_opaque_sp() {}
-
-PTInstructionList::PTInstructionList(const PTInstructionList &insn_list)
-    : m_opaque_sp(insn_list.m_opaque_sp) {}
-
-PTInstructionList::~PTInstructionList() {}
-
 size_t PTInstructionList::GetSize() const {
   return (m_opaque_sp ? m_opaque_sp->GetSize() : 0);
 }

Modified: lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h (original)
+++ lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h Wed May 15 04:23:54 2019
@@ -36,9 +36,7 @@ namespace ptdecoder {
 ///     context.
 class PTInstruction {
 public:
-  PTInstruction();
-
-  PTInstruction(const PTInstruction &insn);
+  PTInstruction() = default;
 
   PTInstruction(const std::shared_ptr<ptdecoder_private::Instruction> &ptr);
 
@@ -82,12 +80,6 @@ private:
 ///     type PTInstruction.
 class PTInstructionList {
 public:
-  PTInstructionList();
-
-  PTInstructionList(const PTInstructionList &insn_list);
-
-  ~PTInstructionList();
-
   // Get number of instructions in the list
   size_t GetSize() const;
 

Modified: lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp (original)
+++ lldb/trunk/tools/lldb-perf/lib/MemoryGauge.cpp Wed May 15 04:23:54 2019
@@ -22,19 +22,6 @@ MemoryStats::MemoryStats(mach_vm_size_t
     : m_virtual_size(virtual_size), m_resident_size(resident_size),
       m_max_resident_size(max_resident_size) {}
 
-MemoryStats::MemoryStats(const MemoryStats &rhs)
-    : m_virtual_size(rhs.m_virtual_size), m_resident_size(rhs.m_resident_size),
-      m_max_resident_size(rhs.m_max_resident_size) {}
-
-MemoryStats &MemoryStats::operator=(const MemoryStats &rhs) {
-  if (this != &rhs) {
-    m_virtual_size = rhs.m_virtual_size;
-    m_resident_size = rhs.m_resident_size;
-    m_max_resident_size = rhs.m_max_resident_size;
-  }
-  return *this;
-}
-
 MemoryStats &MemoryStats::operator+=(const MemoryStats &rhs) {
   m_virtual_size += rhs.m_virtual_size;
   m_resident_size += rhs.m_resident_size;

Modified: lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h?rev=360762&r1=360761&r2=360762&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h (original)
+++ lldb/trunk/tools/lldb-perf/lib/MemoryGauge.h Wed May 15 04:23:54 2019
@@ -20,9 +20,6 @@ class MemoryStats {
 public:
   MemoryStats(mach_vm_size_t virtual_size = 0, mach_vm_size_t resident_size = 0,
               mach_vm_size_t max_resident_size = 0);
-  MemoryStats(const MemoryStats &rhs);
-
-  MemoryStats &operator=(const MemoryStats &rhs);
 
   MemoryStats &operator+=(const MemoryStats &rhs);
 




More information about the lldb-commits mailing list