This is an archive of the discontinued LLVM Phabricator instance.

[Serialization] Fix a uniqueness check
Needs ReviewPublic

Authored by kazu on Oct 22 2021, 11:17 AM.

Details

Summary

The function is intended to maintain uniqueness of two sets -- Found
and Data. Now, we can reach the for loop shown in the patch only when
Found.empty(). This means that we never execute the body of the for
loop.

The patch fixes the problem by replacing Found with Data.

Diff Detail

Event Timeline

kazu requested review of this revision.Oct 22 2021, 11:17 AM
kazu created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptOct 22 2021, 11:17 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript

This looks like a sensible change to me, but it is missing test coverage. Can you add a test that demonstrates what this fixes?