This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Minor clean up: use .find() to check for key existence rather than [], which would create a new entry.
ClosedPublic

Authored by oontvoo on Feb 3 2022, 2:05 PM.

Diff Detail

Event Timeline

oontvoo created this revision.Feb 3 2022, 2:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2022, 2:05 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
oontvoo requested review of this revision.Feb 3 2022, 2:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 3 2022, 2:05 PM
int3 accepted this revision.Feb 3 2022, 2:09 PM
int3 added a subscriber: int3.

Thanks!

This revision is now accepted and ready to land.Feb 3 2022, 2:09 PM
keith accepted this revision.Feb 3 2022, 2:09 PM
keith added a subscriber: keith.

Thanks I wasn't aware of this, but it looks like this was the only one doing this.

Thanks I wasn't aware of this, but it looks like this was the only one doing this.

Yeah I hadn't noticed this until I ran this code with a readlock (not a write lock) and got a crash due to concurrent writes.

This revision was landed with ongoing or failed builds.Feb 3 2022, 2:17 PM
This revision was automatically updated to reflect the committed changes.