This is an archive of the discontinued LLVM Phabricator instance.

[clang][NFC] encapsulate global method list in GlobalMethodPool
AbandonedPublic

Authored by rmaz on Sep 20 2021, 11:39 AM.

Details

Summary

This change moves the addMethodToGlobalList function to be a
private member function of the GlobalMethodPool class. This
is a preparatory step to allow for de-duplication of inserted
methods.

Two public methods are added to handle the existing use cases
for adding methods to a global list: addMethodsForSelector
and addMethod. The former is required to avoid the overhead
of looking up the Methods map for each insert when adding
multiple methods for a single selector when deserializing AST
files. It also allows for modifying the list properties first.

Diff Detail

Event Timeline

rmaz requested review of this revision.Sep 20 2021, 11:39 AM
rmaz created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2021, 11:39 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rmaz updated this revision to Diff 373675.Sep 20 2021, 11:45 AM

remove unnecessary empty check

rmaz abandoned this revision.Oct 25 2021, 4:58 PM

Abandoning in favor of D110123