Page MenuHomePhabricator

[ADT] Adds equality operator for SmallPtrSet
ClosedPublic

Authored by yrouban on Oct 25 2019, 4:26 AM.

Details

Summary

This change makes it easier to migrate existing code that uses std::set (which support equality comparison) to SmallPtrSet.

Diff Detail

Event Timeline

yrouban created this revision.Oct 25 2019, 4:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 25 2019, 4:26 AM
Herald added a subscriber: dexonsmith. · View Herald Transcript
tellenbach added inline comments.
llvm/include/llvm/ADT/SmallPtrSet.h
422

NIT: Can this be const?

llvm/unittests/ADT/SmallPtrSetTest.cpp
334

Can you add a unit test for testing the inequality of different-sized sets?

335

Can you use a smaller buffer and initialize it?

yrouban updated this revision to Diff 226616.Oct 27 2019, 11:56 PM
yrouban marked 2 inline comments as done.

Addressed all comments.

tellenbach accepted this revision.Oct 28 2019, 3:15 AM

Thanks for addressing the comments, LGTM.

This revision is now accepted and ready to land.Oct 28 2019, 3:15 AM
This revision was automatically updated to reflect the committed changes.