[PATCH] D110092: [clang][NFC] encapsulate global method list in GlobalMethodPool

Richard Howell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 20 11:39:04 PDT 2021


rmaz created this revision.
rmaz requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D110092

Files:
  clang/include/clang/Sema/Sema.h
  clang/lib/Sema/Sema.cpp
  clang/lib/Sema/SemaDeclObjC.cpp
  clang/lib/Serialization/ASTReader.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110092.373671.patch
Type: text/x-patch
Size: 7947 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210920/4e6242a4/attachment-0001.bin>


More information about the cfe-commits mailing list