Author: maskray Date: Wed May 22 01:38:23 2019 New Revision: 361358 URL: http://llvm.org/viewvc/llvm-project?rev=361358&view=rev Log: Delete unnecessary copy ctors
Modified: lldb/trunk/include/lldb/Core/SearchFilter.h lldb/trunk/include/lldb/Utility/FileSpec.h lldb/trunk/include/lldb/Utility/Scalar.h lldb/trunk/source/Core/SearchFilter.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h lldb/trunk/source/Utility/FileSpec.cpp lldb/trunk/source/Utility/Scalar.cpp lldb/trunk/tools/debugserver/source/StdStringExtractor.cpp lldb/trunk/tools/debugserver/source/StdStringExtractor.h lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h Modified: lldb/trunk/include/lldb/Core/SearchFilter.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/SearchFilter.h?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/include/lldb/Core/SearchFilter.h (original) +++ lldb/trunk/include/lldb/Core/SearchFilter.h Wed May 22 01:38:23 2019 @@ -364,8 +364,6 @@ public: const FileSpecList &module_list, enum FilterTy filter_ty); - SearchFilterByModuleList(const SearchFilterByModuleList &rhs); - ~SearchFilterByModuleList() override; SearchFilterByModuleList &operator=(const SearchFilterByModuleList &rhs); Modified: lldb/trunk/include/lldb/Utility/FileSpec.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/FileSpec.h?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/include/lldb/Utility/FileSpec.h (original) +++ lldb/trunk/include/lldb/Utility/FileSpec.h Wed May 22 01:38:23 2019 @@ -77,14 +77,6 @@ public: /// Copy constructor /// - /// Makes a copy of the uniqued directory and filename strings from \a rhs. - /// - /// \param[in] rhs - /// A const FileSpec object reference to copy. - FileSpec(const FileSpec &rhs); - - /// Copy constructor - /// /// Makes a copy of the uniqued directory and filename strings from \a rhs /// if it is not nullptr. /// Modified: lldb/trunk/include/lldb/Utility/Scalar.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/Scalar.h?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/include/lldb/Utility/Scalar.h (original) +++ lldb/trunk/include/lldb/Utility/Scalar.h Wed May 22 01:38:23 2019 @@ -115,7 +115,6 @@ public: } lldbassert(false && "unsupported bitwidth"); } - Scalar(const Scalar &rhs); // Scalar(const RegisterValue& reg_value); virtual ~Scalar(); Modified: lldb/trunk/source/Core/SearchFilter.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/SearchFilter.cpp?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/source/Core/SearchFilter.cpp (original) +++ lldb/trunk/source/Core/SearchFilter.cpp Wed May 22 01:38:23 2019 @@ -524,9 +524,6 @@ SearchFilterByModuleList::SearchFilterBy enum FilterTy filter_ty) : SearchFilter(target_sp, filter_ty), m_module_spec_list(module_list) {} -SearchFilterByModuleList::SearchFilterByModuleList( - const SearchFilterByModuleList &rhs) = default; - SearchFilterByModuleList &SearchFilterByModuleList:: operator=(const SearchFilterByModuleList &rhs) { m_target_sp = rhs.m_target_sp; Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp Wed May 22 01:38:23 2019 @@ -215,8 +215,6 @@ PythonBytes::PythonBytes(PyRefType type, Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a string } -PythonBytes::PythonBytes(const PythonBytes &object) : PythonObject(object) {} - PythonBytes::~PythonBytes() {} bool PythonBytes::Check(PyObject *py_obj) { @@ -340,8 +338,6 @@ PythonString::PythonString(PyRefType typ Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a string } -PythonString::PythonString(const PythonString &object) : PythonObject(object) {} - PythonString::PythonString(llvm::StringRef string) : PythonObject() { SetString(string); } @@ -441,9 +437,6 @@ PythonInteger::PythonInteger(PyRefType t Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a integer type } -PythonInteger::PythonInteger(const PythonInteger &object) - : PythonObject(object) {} - PythonInteger::PythonInteger(int64_t value) : PythonObject() { SetInteger(value); } @@ -529,9 +522,6 @@ PythonBoolean::PythonBoolean(PyRefType t Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a boolean type } -PythonBoolean::PythonBoolean(const PythonBoolean &object) - : PythonObject(object) {} - PythonBoolean::PythonBoolean(bool value) { SetValue(value); } @@ -584,8 +574,6 @@ PythonList::PythonList(PyRefType type, P Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a list } -PythonList::PythonList(const PythonList &list) : PythonObject(list) {} - PythonList::~PythonList() {} bool PythonList::Check(PyObject *py_obj) { @@ -663,8 +651,6 @@ PythonTuple::PythonTuple(PyRefType type, Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a tuple } -PythonTuple::PythonTuple(const PythonTuple &tuple) : PythonObject(tuple) {} - PythonTuple::PythonTuple(std::initializer_list<PythonObject> objects) { m_py_obj = PyTuple_New(objects.size()); @@ -754,9 +740,6 @@ PythonDictionary::PythonDictionary(PyRef Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a dictionary } -PythonDictionary::PythonDictionary(const PythonDictionary &object) - : PythonObject(object) {} - PythonDictionary::~PythonDictionary() {} bool PythonDictionary::Check(PyObject *py_obj) { @@ -826,8 +809,6 @@ PythonModule::PythonModule(PyRefType typ Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a module } -PythonModule::PythonModule(const PythonModule &dict) : PythonObject(dict) {} - PythonModule::~PythonModule() {} PythonModule PythonModule::BuiltinsModule() { @@ -882,9 +863,6 @@ PythonCallable::PythonCallable(PyRefType Reset(type, py_obj); // Use "Reset()" to ensure that py_obj is a callable } -PythonCallable::PythonCallable(const PythonCallable &callable) - : PythonObject(callable) {} - PythonCallable::~PythonCallable() {} bool PythonCallable::Check(PyObject *py_obj) { Modified: lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h (original) +++ lldb/trunk/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h Wed May 22 01:38:23 2019 @@ -198,7 +198,6 @@ public: explicit PythonBytes(llvm::ArrayRef<uint8_t> bytes); PythonBytes(const uint8_t *bytes, size_t length); PythonBytes(PyRefType type, PyObject *o); - PythonBytes(const PythonBytes &object); ~PythonBytes() override; @@ -250,7 +249,6 @@ public: explicit PythonString(llvm::StringRef string); explicit PythonString(const char *string); PythonString(PyRefType type, PyObject *o); - PythonString(const PythonString &object); ~PythonString() override; @@ -275,7 +273,6 @@ public: PythonInteger(); explicit PythonInteger(int64_t value); PythonInteger(PyRefType type, PyObject *o); - PythonInteger(const PythonInteger &object); ~PythonInteger() override; @@ -298,7 +295,6 @@ public: PythonBoolean() = default; explicit PythonBoolean(bool value); PythonBoolean(PyRefType type, PyObject *o); - PythonBoolean(const PythonBoolean &object); ~PythonBoolean() override = default; @@ -322,7 +318,6 @@ public: explicit PythonList(PyInitialValue value); explicit PythonList(int list_size); PythonList(PyRefType type, PyObject *o); - PythonList(const PythonList &list); ~PythonList() override; @@ -350,7 +345,6 @@ public: explicit PythonTuple(PyInitialValue value); explicit PythonTuple(int tuple_size); PythonTuple(PyRefType type, PyObject *o); - PythonTuple(const PythonTuple &tuple); PythonTuple(std::initializer_list<PythonObject> objects); PythonTuple(std::initializer_list<PyObject *> objects); @@ -377,7 +371,6 @@ public: PythonDictionary() {} explicit PythonDictionary(PyInitialValue value); PythonDictionary(PyRefType type, PyObject *o); - PythonDictionary(const PythonDictionary &dict); ~PythonDictionary() override; @@ -402,7 +395,6 @@ class PythonModule : public PythonObject public: PythonModule(); PythonModule(PyRefType type, PyObject *o); - PythonModule(const PythonModule &dict); ~PythonModule() override; @@ -435,7 +427,6 @@ public: PythonCallable(); PythonCallable(PyRefType type, PyObject *o); - PythonCallable(const PythonCallable &dict); ~PythonCallable() override; Modified: lldb/trunk/source/Utility/FileSpec.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/FileSpec.cpp?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/source/Utility/FileSpec.cpp (original) +++ lldb/trunk/source/Utility/FileSpec.cpp Wed May 22 01:38:23 2019 @@ -76,11 +76,6 @@ FileSpec::FileSpec(llvm::StringRef path, : FileSpec{path, Triple.isOSWindows() ? Style::windows : Style::posix} {} // Copy constructor -FileSpec::FileSpec(const FileSpec &rhs) - : m_directory(rhs.m_directory), m_filename(rhs.m_filename), - m_is_resolved(rhs.m_is_resolved), m_style(rhs.m_style) {} - -// Copy constructor FileSpec::FileSpec(const FileSpec *rhs) : m_directory(), m_filename() { if (rhs) *this = *rhs; Modified: lldb/trunk/source/Utility/Scalar.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/Scalar.cpp?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/source/Utility/Scalar.cpp (original) +++ lldb/trunk/source/Utility/Scalar.cpp Wed May 22 01:38:23 2019 @@ -71,9 +71,6 @@ static Scalar::Type PromoteToMaxType( Scalar::Scalar() : m_type(e_void), m_float((float)0) {} -Scalar::Scalar(const Scalar &rhs) - : m_type(rhs.m_type), m_integer(rhs.m_integer), m_float(rhs.m_float) {} - bool Scalar::GetData(DataExtractor &data, size_t limit_byte_size) const { size_t byte_size = GetByteSize(); if (byte_size > 0) { Modified: lldb/trunk/tools/debugserver/source/StdStringExtractor.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/StdStringExtractor.cpp?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/source/StdStringExtractor.cpp (original) +++ lldb/trunk/tools/debugserver/source/StdStringExtractor.cpp Wed May 22 01:38:23 2019 @@ -30,20 +30,6 @@ StdStringExtractor::StdStringExtractor(c m_packet.assign(packet_cstr); } -// StdStringExtractor copy constructor -StdStringExtractor::StdStringExtractor(const StdStringExtractor &rhs) - : m_packet(rhs.m_packet), m_index(rhs.m_index) {} - -// StdStringExtractor assignment operator -const StdStringExtractor &StdStringExtractor:: -operator=(const StdStringExtractor &rhs) { - if (this != &rhs) { - m_packet = rhs.m_packet; - m_index = rhs.m_index; - } - return *this; -} - // Destructor StdStringExtractor::~StdStringExtractor() {} Modified: lldb/trunk/tools/debugserver/source/StdStringExtractor.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/StdStringExtractor.h?rev=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/source/StdStringExtractor.h (original) +++ lldb/trunk/tools/debugserver/source/StdStringExtractor.h Wed May 22 01:38:23 2019 @@ -21,12 +21,8 @@ public: // Constructors and Destructors StdStringExtractor(); StdStringExtractor(const char *packet_cstr); - StdStringExtractor(const StdStringExtractor &rhs); virtual ~StdStringExtractor(); - // Operators - const StdStringExtractor &operator=(const StdStringExtractor &rhs); - // Returns true if the file position is still valid for the data // contained in this string extractor object. bool IsGood() const { return m_index != UINT64_MAX; } 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=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp (original) +++ lldb/trunk/tools/intel-features/intel-pt/PTDecoder.cpp Wed May 22 01:38:23 2019 @@ -60,13 +60,6 @@ void PTInstructionList::Clear() { } // PTTraceOptions class member functions definitions -PTTraceOptions::PTTraceOptions() : m_opaque_sp() {} - -PTTraceOptions::PTTraceOptions(const PTTraceOptions &options) - : m_opaque_sp(options.m_opaque_sp) {} - -PTTraceOptions::~PTTraceOptions() {} - lldb::TraceType PTTraceOptions::GetType() const { return (m_opaque_sp ? m_opaque_sp->getType() : lldb::TraceType::eTraceTypeNone); @@ -96,11 +89,6 @@ void PTTraceOptions::SetSP( PTDecoder::PTDecoder(lldb::SBDebugger &sbdebugger) : m_opaque_sp(new ptdecoder_private::Decoder(sbdebugger)) {} -PTDecoder::PTDecoder(const PTDecoder &ptdecoder) - : m_opaque_sp(ptdecoder.m_opaque_sp) {} - -PTDecoder::~PTDecoder() {} - void PTDecoder::StartProcessorTrace(lldb::SBProcess &sbprocess, lldb::SBTraceOptions &sbtraceoptions, lldb::SBError &sberror) { 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=361358&r1=361357&r2=361358&view=diff ============================================================================== --- lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h (original) +++ lldb/trunk/tools/intel-features/intel-pt/PTDecoder.h Wed May 22 01:38:23 2019 @@ -102,12 +102,6 @@ private: /// specific options. class PTTraceOptions { public: - PTTraceOptions(); - - PTTraceOptions(const PTTraceOptions &options); - - ~PTTraceOptions(); - lldb::TraceType GetType() const; uint64_t GetTraceBufferSize() const; @@ -148,10 +142,6 @@ class PTDecoder { public: PTDecoder(lldb::SBDebugger &sbdebugger); - PTDecoder(const PTDecoder &ptdecoder); - - ~PTDecoder(); - /// Start Intel(R) Processor Trace on a thread or complete process with /// Intel(R) Processor Trace specific configuration options /// _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits