Page MenuHomePhabricator

[clang][NFC] encapsulate global method list in GlobalMethodPool
Needs ReviewPublic

Authored by rmaz on Mon, Sep 20, 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.Mon, Sep 20, 11:39 AM
rmaz created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMon, Sep 20, 11:39 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
rmaz updated this revision to Diff 373675.Mon, Sep 20, 11:45 AM

remove unnecessary empty check