Debugger: Remove needless explicit copy constructors.
These worked in identical fashion to what the default copy constructors would be, but their mere presence marks the class as being "non-trivially copyable," which means that memcpy'ing it is now a -Werror on GCC 8. We have to be careful when making this change, though: classes which *are* trivially copyable can be passed inside registers on x86_64, so changes like these break ABI in a dangerous way. These classes is private, so it should not be a problem, but for other classes (e.g. BRect, BPoint) we cannot fix them properly right now.
This commit is contained in:
@@ -32,7 +32,6 @@ public:
|
|||||||
uint32 bitSize, uint32 valueType,
|
uint32 bitSize, uint32 valueType,
|
||||||
register_type type, bool calleePreserved);
|
register_type type, bool calleePreserved);
|
||||||
// name will not be cloned
|
// name will not be cloned
|
||||||
Register(const Register& other);
|
|
||||||
|
|
||||||
int32 Index() const { return fIndex; }
|
int32 Index() const { return fIndex; }
|
||||||
const char* Name() const { return fName; }
|
const char* Name() const { return fName; }
|
||||||
|
|||||||
@@ -17,20 +17,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceLocation(const SourceLocation& other)
|
|
||||||
:
|
|
||||||
fLine(other.fLine),
|
|
||||||
fColumn(other.fColumn)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SourceLocation& operator=(const SourceLocation& other)
|
|
||||||
{
|
|
||||||
fLine = other.fLine;
|
|
||||||
fColumn = other.fColumn;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(const SourceLocation& other) const
|
bool operator==(const SourceLocation& other) const
|
||||||
{
|
{
|
||||||
return fLine == other.fLine && fColumn == other.fColumn;
|
return fLine == other.fLine && fColumn == other.fColumn;
|
||||||
|
|||||||
@@ -26,20 +26,6 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetAddressRange(const TargetAddressRange& other)
|
|
||||||
:
|
|
||||||
fStart(other.fStart),
|
|
||||||
fSize(other.fSize)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
TargetAddressRange& operator=(const TargetAddressRange& other)
|
|
||||||
{
|
|
||||||
fStart = other.fStart;
|
|
||||||
fSize = other.fSize;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool operator==(const TargetAddressRange& other) const
|
bool operator==(const TargetAddressRange& other) const
|
||||||
{
|
{
|
||||||
return fStart == other.fStart && fSize == other.fSize;
|
return fStart == other.fStart && fSize == other.fSize;
|
||||||
|
|||||||
@@ -43,16 +43,3 @@ Register::Register(int32 index, const char* name, uint32 bitSize,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Register::Register(const Register& other)
|
|
||||||
:
|
|
||||||
fIndex(other.fIndex),
|
|
||||||
fName(other.fName),
|
|
||||||
fBitSize(other.fBitSize),
|
|
||||||
fValueType(other.fValueType),
|
|
||||||
fFormat(other.fFormat),
|
|
||||||
fType(other.fType),
|
|
||||||
fCalleePreserved(other.fCalleePreserved)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user