From: Fangrui Song Date: Wed, 15 May 2019 11:23:54 +0000 (+0000) Subject: Delete unnecessary copy ctors/copy assignment operators X-Git-Tag: llvmorg-10-init~5504 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=71a44224e537a515dca6adc4fdac1675480bdf66;p=platform%2Fupstream%2Fllvm.git Delete unnecessary copy ctors/copy assignment operators It's the simplest and gives the cleanest semantics. llvm-svn: 360762 --- diff --git a/lldb/include/lldb/Core/ModuleChild.h b/lldb/include/lldb/Core/ModuleChild.h index e63abcc..8a81c1a 100644 --- a/lldb/include/lldb/Core/ModuleChild.h +++ b/lldb/include/lldb/Core/ModuleChild.h @@ -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(); diff --git a/lldb/include/lldb/Core/SearchFilter.h b/lldb/include/lldb/Core/SearchFilter.h index bf3c4ec..01dcadd 100644 --- a/lldb/include/lldb/Core/SearchFilter.h +++ b/lldb/include/lldb/Core/SearchFilter.h @@ -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; diff --git a/lldb/include/lldb/Core/ValueObjectList.h b/lldb/include/lldb/Core/ValueObjectList.h index 809c182..42d1967 100644 --- a/lldb/include/lldb/Core/ValueObjectList.h +++ b/lldb/include/lldb/Core/ValueObjectList.h @@ -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); diff --git a/lldb/include/lldb/DataFormatters/TypeSummary.h b/lldb/include/lldb/DataFormatters/TypeSummary.h index 9cd05f0..9c97b36 100644 --- a/lldb/include/lldb/DataFormatters/TypeSummary.h +++ b/lldb/include/lldb/DataFormatters/TypeSummary.h @@ -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; diff --git a/lldb/include/lldb/Expression/DWARFExpression.h b/lldb/include/lldb/Expression/DWARFExpression.h index 3ec8115..0a7d919 100644 --- a/lldb/include/lldb/Expression/DWARFExpression.h +++ b/lldb/include/lldb/Expression/DWARFExpression.h @@ -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(); diff --git a/lldb/include/lldb/Host/SocketAddress.h b/lldb/include/lldb/Host/SocketAddress.h index a655c82..620827f 100644 --- a/lldb/include/lldb/Host/SocketAddress.h +++ b/lldb/include/lldb/Host/SocketAddress.h @@ -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 diff --git a/lldb/include/lldb/Symbol/SymbolContext.h b/lldb/include/lldb/Symbol/SymbolContext.h index 92c3f3a..55a3454 100644 --- a/lldb/include/lldb/Symbol/SymbolContext.h +++ b/lldb/include/lldb/Symbol/SymbolContext.h @@ -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. diff --git a/lldb/include/lldb/Symbol/Type.h b/lldb/include/lldb/Symbol/Type.h index d38210d..efc9bf0 100644 --- a/lldb/include/lldb/Symbol/Type.h +++ b/lldb/include/lldb/Symbol/Type.h @@ -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); diff --git a/lldb/include/lldb/Target/ThreadSpec.h b/lldb/include/lldb/Target/ThreadSpec.h index f1710f8..05e7dcd 100644 --- a/lldb/include/lldb/Target/ThreadSpec.h +++ b/lldb/include/lldb/Target/ThreadSpec.h @@ -34,10 +34,6 @@ class ThreadSpec { public: ThreadSpec(); - ThreadSpec(const ThreadSpec &rhs); - - const ThreadSpec &operator=(const ThreadSpec &rhs); - static std::unique_ptr CreateFromStructuredData(const StructuredData::Dictionary &data_dict, Status &error); diff --git a/lldb/include/lldb/Utility/Broadcaster.h b/lldb/include/lldb/Utility/Broadcaster.h index 2667f25..df1a664 100644 --- a/lldb/include/lldb/Utility/Broadcaster.h +++ b/lldb/include/lldb/Utility/Broadcaster.h @@ -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; } diff --git a/lldb/include/lldb/Utility/Status.h b/lldb/include/lldb/Utility/Status.h index e8fae8a..ae730b9 100644 --- a/lldb/include/lldb/Utility/Status.h +++ b/lldb/include/lldb/Utility/Status.h @@ -66,7 +66,6 @@ public: explicit Status(const char *format, ...) __attribute__((format(printf, 2, 3))); - Status(const Status &rhs); /// Assignment operator. /// /// \param[in] err diff --git a/lldb/include/lldb/Utility/StringExtractor.h b/lldb/include/lldb/Utility/StringExtractor.h index 6d5579e..f20ec921 100644 --- a/lldb/include/lldb/Utility/StringExtractor.h +++ b/lldb/include/lldb/Utility/StringExtractor.h @@ -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; diff --git a/lldb/include/lldb/Utility/StringLexer.h b/lldb/include/lldb/Utility/StringLexer.h index 239d244..d9806c1 100644 --- a/lldb/include/lldb/Utility/StringLexer.h +++ b/lldb/include/lldb/Utility/StringLexer.h @@ -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(); diff --git a/lldb/source/Core/ModuleChild.cpp b/lldb/source/Core/ModuleChild.cpp index 842dcb3..2fcb2ff 100644 --- a/lldb/source/Core/ModuleChild.cpp +++ b/lldb/source/Core/ModuleChild.cpp @@ -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) { diff --git a/lldb/source/Core/SearchFilter.cpp b/lldb/source/Core/SearchFilter.cpp index 2f6b16f..c0c14fc 100644 --- a/lldb/source/Core/SearchFilter.cpp +++ b/lldb/source/Core/SearchFilter.cpp @@ -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::SearchFilterByModule(const lldb::TargetSP &target_sp, 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) { diff --git a/lldb/source/Core/ValueObjectList.cpp b/lldb/source/Core/ValueObjectList.cpp index 3c6ed52..358a1b1 100644 --- a/lldb/source/Core/ValueObjectList.cpp +++ b/lldb/source/Core/ValueObjectList.cpp @@ -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; diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index 1a64960..7f6930f 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -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 { diff --git a/lldb/source/Expression/DWARFExpression.cpp b/lldb/source/Expression/DWARFExpression.cpp index 5250e4d..cbba511 100644 --- a/lldb/source/Expression/DWARFExpression.cpp +++ b/lldb/source/Expression/DWARFExpression.cpp @@ -55,11 +55,6 @@ DWARFExpression::DWARFExpression(DWARFUnit *dwarf_cu) : 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, diff --git a/lldb/source/Host/common/SocketAddress.cpp b/lldb/source/Host/common/SocketAddress.cpp index 46c0639..06171d4 100644 --- a/lldb/source/Host/common/SocketAddress.cpp +++ b/lldb/source/Host/common/SocketAddress.cpp @@ -92,10 +92,6 @@ SocketAddress::SocketAddress(const struct addrinfo *addr_info) { *this = addr_info; } -// SocketAddress copy constructor -SocketAddress::SocketAddress(const SocketAddress &rhs) - : m_socket_addr(rhs.m_socket_addr) {} - // Destructor SocketAddress::~SocketAddress() {} diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp index 2c14bb3..187a7b1 100644 --- a/lldb/source/Symbol/SymbolContext.cpp +++ b/lldb/source/Symbol/SymbolContext.cpp @@ -47,11 +47,6 @@ SymbolContext::SymbolContext(const TargetSP &t, const ModuleSP &m, 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) { diff --git a/lldb/source/Symbol/Type.cpp b/lldb/source/Symbol/Type.cpp index cb07824..35c1a26 100644 --- a/lldb/source/Symbol/Type.cpp +++ b/lldb/source/Symbol/Type.cpp @@ -138,15 +138,6 @@ Type::Type() m_flags.is_complete_objc_class = false; } -Type::Type(const Type &rhs) - : std::enable_shared_from_this(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() const { 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 CompilerType &compiler_type, 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 diff --git a/lldb/source/Target/ThreadSpec.cpp b/lldb/source/Target/ThreadSpec.cpp index 4441849..1a733cb 100644 --- a/lldb/source/Target/ThreadSpec.cpp +++ b/lldb/source/Target/ThreadSpec.cpp @@ -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::CreateFromStructuredData( const StructuredData::Dictionary &spec_dict, Status &error) { uint32_t index = UINT32_MAX; diff --git a/lldb/source/Utility/Broadcaster.cpp b/lldb/source/Utility/Broadcaster.cpp index 9e1b638..b42af00 100644 --- a/lldb/source/Utility/Broadcaster.cpp +++ b/lldb/source/Utility/Broadcaster.cpp @@ -316,8 +316,6 @@ ConstString &Broadcaster::GetBroadcasterClass() const { return class_name; } -BroadcastEventSpec::BroadcastEventSpec(const BroadcastEventSpec &rhs) = default; - bool BroadcastEventSpec::operator<(const BroadcastEventSpec &rhs) const { if (GetBroadcasterClass() == rhs.GetBroadcasterClass()) { return GetEventBits() < rhs.GetEventBits(); diff --git a/lldb/source/Utility/Status.cpp b/lldb/source/Utility/Status.cpp index 95e2b14..3d64fb8 100644 --- a/lldb/source/Utility/Status.cpp +++ b/lldb/source/Utility/Status.cpp @@ -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; diff --git a/lldb/source/Utility/StringExtractor.cpp b/lldb/source/Utility/StringExtractor.cpp index e455310..da7d8f4 100644 --- a/lldb/source/Utility/StringExtractor.cpp +++ b/lldb/source/Utility/StringExtractor.cpp @@ -38,19 +38,6 @@ StringExtractor::StringExtractor(const char *packet_cstr) 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() {} diff --git a/lldb/source/Utility/StringLexer.cpp b/lldb/source/Utility/StringLexer.cpp index af14674..958a958 100644 --- a/lldb/source/Utility/StringLexer.cpp +++ b/lldb/source/Utility/StringLexer.cpp @@ -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) { diff --git a/lldb/tools/intel-features/intel-pt/PTDecoder.cpp b/lldb/tools/intel-features/intel-pt/PTDecoder.cpp index 01038b8..d7f9ace 100644 --- a/lldb/tools/intel-features/intel-pt/PTDecoder.cpp +++ b/lldb/tools/intel-features/intel-pt/PTDecoder.cpp @@ -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 &ptr) : m_opaque_sp(ptr) {} @@ -41,13 +36,6 @@ bool PTInstruction::GetSpeculative() const { } // 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); } diff --git a/lldb/tools/intel-features/intel-pt/PTDecoder.h b/lldb/tools/intel-features/intel-pt/PTDecoder.h index 10f2a58..6901f44 100644 --- a/lldb/tools/intel-features/intel-pt/PTDecoder.h +++ b/lldb/tools/intel-features/intel-pt/PTDecoder.h @@ -36,9 +36,7 @@ namespace ptdecoder { /// context. class PTInstruction { public: - PTInstruction(); - - PTInstruction(const PTInstruction &insn); + PTInstruction() = default; PTInstruction(const std::shared_ptr &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; diff --git a/lldb/tools/lldb-perf/lib/MemoryGauge.cpp b/lldb/tools/lldb-perf/lib/MemoryGauge.cpp index 432c93d..59d3936 100644 --- a/lldb/tools/lldb-perf/lib/MemoryGauge.cpp +++ b/lldb/tools/lldb-perf/lib/MemoryGauge.cpp @@ -22,19 +22,6 @@ MemoryStats::MemoryStats(mach_vm_size_t virtual_size, : 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; diff --git a/lldb/tools/lldb-perf/lib/MemoryGauge.h b/lldb/tools/lldb-perf/lib/MemoryGauge.h index 2abf62f..21b1fe1 100644 --- a/lldb/tools/lldb-perf/lib/MemoryGauge.h +++ b/lldb/tools/lldb-perf/lib/MemoryGauge.h @@ -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);