-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[RemoteAddress] Handle comparison of addresses in different spaces #82995
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
Conversation
@swift-ci smoke test |
@@ -64,6 +64,11 @@ TypeRefBuilder::ReflectionTypeDescriptorFinder:: | |||
.TypeReference.startAddress() | |||
.getRemoteAddress(); | |||
|
|||
// Sort first by address space, then by address. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh I guess this is the comment. Should RemoteAddress implement <
? Or should this logic be encapsulated somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RemoteAddress does implement <
, but by default we assert if the address spaces are different. For ordering purposes it makes sense to compare the address space too though, as long as we are consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added oderedLessThan
and orderedLessThanOrEqual
to encapsulate this logic.
6e279fc
to
89f6a7b
Compare
Sometimes it makes sense to compares addresses from different address spaces. rdar://148361743
89f6a7b
to
c97dfd6
Compare
@swift-ci smoke test |
Sometimes it makes sense to compares addresses from different address spaces.
rdar://148361743