This is an archive of the discontinued LLVM Phabricator instance.

[IndVars] Fix sort comparator.
ClosedPublic

Authored by efriedma on Feb 21 2020, 4:06 PM.

Details

Summary

std::sort will compare an element to itself in some cases. We should not crash if this happens.

Diff Detail

Event Timeline

efriedma created this revision.Feb 21 2020, 4:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 21 2020, 4:06 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
fhahn added a subscriber: fhahn.Feb 22 2020, 12:44 PM
reames accepted this revision.Feb 25 2020, 9:16 AM

LGTM

This revision is now accepted and ready to land.Feb 25 2020, 9:16 AM
This revision was automatically updated to reflect the committed changes.