Skip to content

[lldb] Mark operator== const to avoid ambiguity in C++20. #68224

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lldb/include/lldb/Utility/XcodeSDK.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class XcodeSDK {

XcodeSDK &operator=(const XcodeSDK &other);
XcodeSDK(const XcodeSDK&) = default;
bool operator==(const XcodeSDK &other);
bool operator==(const XcodeSDK &other) const;

/// Return parsed SDK type and version number.
Info Parse() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,8 +606,8 @@ void DynamicLoaderDarwinKernel::KextImageInfo::SetProcessStopId(
m_load_process_stop_id = stop_id;
}

bool DynamicLoaderDarwinKernel::KextImageInfo::
operator==(const KextImageInfo &rhs) {
bool DynamicLoaderDarwinKernel::KextImageInfo::operator==(
const KextImageInfo &rhs) const {
if (m_uuid.IsValid() || rhs.GetUUID().IsValid()) {
return m_uuid == rhs.GetUUID();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class DynamicLoaderDarwinKernel : public lldb_private::DynamicLoader {

void SetProcessStopId(uint32_t stop_id);

bool operator==(const KextImageInfo &rhs);
bool operator==(const KextImageInfo &rhs) const;

uint32_t GetAddressByteSize(); // as determined by Mach-O header

Expand Down
2 changes: 1 addition & 1 deletion lldb/source/Utility/XcodeSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ XcodeSDK::XcodeSDK(XcodeSDK::Info info) : m_name(GetName(info.type).str()) {

XcodeSDK &XcodeSDK::operator=(const XcodeSDK &other) = default;

bool XcodeSDK::operator==(const XcodeSDK &other) {
bool XcodeSDK::operator==(const XcodeSDK &other) const {
return m_name == other.m_name;
}

Expand Down