[clang][NFC] refactor GlobalMethodPool to encapsulate its map
authorRichard Howell <rhow@fb.com>
Thu, 16 Sep 2021 21:01:30 +0000 (14:01 -0700)
committerDaniel Rodríguez Troitiño <danielrodriguez@fb.com>
Thu, 16 Sep 2021 21:02:14 +0000 (14:02 -0700)
commite6020b2a42245d888e941eba66fbce9d0c4ab0a8
treed9e2a44645f9b4ca6da93a89f86e442e3fa92c17
parent2aa8474210044e41b527bd68870991b4104c4f2f
[clang][NFC] refactor GlobalMethodPool to encapsulate its map

This refactor changes the GlobalMethodPool to a class that contains
the DenseMap of methods. This is to allow for the addition of a
separate DenseSet in a follow-up diff that will handle method
de-duplication when inserting methods into the global method pool.

Changes:
  - the `GlobalMethods` pair becomes `GlobalMethodPool::Lists`
  - the `GlobalMethodPool` becomes a class containing the `DenseMap` of methods
  - pass through methods are added to maintain most of the existing code without changing `MethodPool` -> `MethodPool.Methods` everywhere

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D109898
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaDeclObjC.cpp
clang/lib/Serialization/ASTReader.cpp