Skip to content

Commit

Permalink
Delete unnecessary copy ctors
Browse files Browse the repository at this point in the history
llvm-svn: 361358
  • Loading branch information
MaskRay authored and MrSidims committed May 24, 2019
1 parent ffb0bf0 commit 395b99c
Show file tree
Hide file tree
Showing 12 changed files with 0 additions and 93 deletions.
2 changes: 0 additions & 2 deletions lldb/include/lldb/Core/SearchFilter.h
Expand Up @@ -364,8 +364,6 @@ class SearchFilterByModuleList : public SearchFilter {
const FileSpecList &module_list,
enum FilterTy filter_ty);

SearchFilterByModuleList(const SearchFilterByModuleList &rhs);

~SearchFilterByModuleList() override;

SearchFilterByModuleList &operator=(const SearchFilterByModuleList &rhs);
Expand Down
8 changes: 0 additions & 8 deletions lldb/include/lldb/Utility/FileSpec.h
Expand Up @@ -75,14 +75,6 @@ class FileSpec {

explicit FileSpec(llvm::StringRef path, const llvm::Triple &Triple);

/// 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
Expand Down
1 change: 0 additions & 1 deletion lldb/include/lldb/Utility/Scalar.h
Expand Up @@ -115,7 +115,6 @@ class Scalar {
}
lldbassert(false && "unsupported bitwidth");
}
Scalar(const Scalar &rhs);
// Scalar(const RegisterValue& reg_value);
virtual ~Scalar();

Expand Down
3 changes: 0 additions & 3 deletions lldb/source/Core/SearchFilter.cpp
Expand Up @@ -524,9 +524,6 @@ SearchFilterByModuleList::SearchFilterByModuleList(
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;
Expand Down
22 changes: 0 additions & 22 deletions lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
Expand Up @@ -215,8 +215,6 @@ PythonBytes::PythonBytes(PyRefType type, PyObject *py_obj) : PythonObject() {
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) {
Expand Down Expand Up @@ -340,8 +338,6 @@ PythonString::PythonString(PyRefType type, PyObject *py_obj) : PythonObject() {
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);
}
Expand Down Expand Up @@ -441,9 +437,6 @@ PythonInteger::PythonInteger(PyRefType type, PyObject *py_obj)
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);
}
Expand Down Expand Up @@ -529,9 +522,6 @@ PythonBoolean::PythonBoolean(PyRefType type, PyObject *py_obj)
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);
}
Expand Down Expand Up @@ -584,8 +574,6 @@ PythonList::PythonList(PyRefType type, PyObject *py_obj) : PythonObject() {
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) {
Expand Down Expand Up @@ -663,8 +651,6 @@ PythonTuple::PythonTuple(PyRefType type, PyObject *py_obj) : PythonObject() {
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());

Expand Down Expand Up @@ -754,9 +740,6 @@ PythonDictionary::PythonDictionary(PyRefType type, PyObject *py_obj)
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) {
Expand Down Expand Up @@ -826,8 +809,6 @@ PythonModule::PythonModule(PyRefType type, PyObject *py_obj) {
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() {
Expand Down Expand Up @@ -882,9 +863,6 @@ PythonCallable::PythonCallable(PyRefType type, PyObject *py_obj) {
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) {
Expand Down
Expand Up @@ -198,7 +198,6 @@ class PythonBytes : public PythonObject {
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;

Expand Down Expand Up @@ -250,7 +249,6 @@ class PythonString : public PythonObject {
explicit PythonString(llvm::StringRef string);
explicit PythonString(const char *string);
PythonString(PyRefType type, PyObject *o);
PythonString(const PythonString &object);

~PythonString() override;

Expand All @@ -275,7 +273,6 @@ class PythonInteger : public PythonObject {
PythonInteger();
explicit PythonInteger(int64_t value);
PythonInteger(PyRefType type, PyObject *o);
PythonInteger(const PythonInteger &object);

~PythonInteger() override;

Expand All @@ -298,7 +295,6 @@ class PythonBoolean : public PythonObject {
PythonBoolean() = default;
explicit PythonBoolean(bool value);
PythonBoolean(PyRefType type, PyObject *o);
PythonBoolean(const PythonBoolean &object);

~PythonBoolean() override = default;

Expand All @@ -322,7 +318,6 @@ class PythonList : public PythonObject {
explicit PythonList(PyInitialValue value);
explicit PythonList(int list_size);
PythonList(PyRefType type, PyObject *o);
PythonList(const PythonList &list);

~PythonList() override;

Expand Down Expand Up @@ -350,7 +345,6 @@ class PythonTuple : public PythonObject {
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);

Expand All @@ -377,7 +371,6 @@ class PythonDictionary : public PythonObject {
PythonDictionary() {}
explicit PythonDictionary(PyInitialValue value);
PythonDictionary(PyRefType type, PyObject *o);
PythonDictionary(const PythonDictionary &dict);

~PythonDictionary() override;

Expand All @@ -402,7 +395,6 @@ class PythonModule : public PythonObject {
public:
PythonModule();
PythonModule(PyRefType type, PyObject *o);
PythonModule(const PythonModule &dict);

~PythonModule() override;

Expand Down Expand Up @@ -435,7 +427,6 @@ class PythonCallable : public PythonObject {

PythonCallable();
PythonCallable(PyRefType type, PyObject *o);
PythonCallable(const PythonCallable &dict);

~PythonCallable() override;

Expand Down
5 changes: 0 additions & 5 deletions lldb/source/Utility/FileSpec.cpp
Expand Up @@ -75,11 +75,6 @@ FileSpec::FileSpec(llvm::StringRef path, Style style) : m_style(style) {
FileSpec::FileSpec(llvm::StringRef path, const llvm::Triple &Triple)
: 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)
Expand Down
3 changes: 0 additions & 3 deletions lldb/source/Utility/Scalar.cpp
Expand Up @@ -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) {
Expand Down
14 changes: 0 additions & 14 deletions lldb/tools/debugserver/source/StdStringExtractor.cpp
Expand Up @@ -30,20 +30,6 @@ StdStringExtractor::StdStringExtractor(const char *packet_cstr)
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() {}

Expand Down
4 changes: 0 additions & 4 deletions lldb/tools/debugserver/source/StdStringExtractor.h
Expand Up @@ -21,12 +21,8 @@ class StdStringExtractor {
// 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; }
Expand Down
12 changes: 0 additions & 12 deletions lldb/tools/intel-features/intel-pt/PTDecoder.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down
10 changes: 0 additions & 10 deletions lldb/tools/intel-features/intel-pt/PTDecoder.h
Expand Up @@ -102,12 +102,6 @@ class PTInstructionList {
/// specific options.
class PTTraceOptions {
public:
PTTraceOptions();

PTTraceOptions(const PTTraceOptions &options);

~PTTraceOptions();

lldb::TraceType GetType() const;

uint64_t GetTraceBufferSize() const;
Expand Down Expand Up @@ -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
///
Expand Down

0 comments on commit 395b99c

Please sign in to comment.