[all-commits] [llvm/llvm-project] 533c7f: [Sema] Declare GlobalMethodPool with using (NFC) (...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Fri Sep 20 13:14:48 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 533c7ff2db6e7f78e34fc0cc1f6390645337d964
https://github.com/llvm/llvm-project/commit/533c7ff2db6e7f78e34fc0cc1f6390645337d964
Author: Kazu Hirata <kazu at google.com>
Date: 2024-09-20 (Fri, 20 Sep 2024)
Changed paths:
M clang/include/clang/Sema/SemaObjC.h
M clang/lib/Sema/SemaDeclObjC.cpp
M clang/lib/Serialization/ASTReader.cpp
Log Message:
-----------
[Sema] Declare GlobalMethodPool with using (NFC) (#109437)
GlobalMethodPool is a wrapper around DenseMap that does not add
anything except:
using Lists = std::pair<ObjCMethodList, ObjCMethodList>;
This patch removes the wrapper and switches to an alias with "using".
In ReadMethodPool in ASTReader.cpp, we can simplify:
insert(std::make_pair(Sel, SemaObjC::GlobalMethodPool::Lists()))
to:
try_emplace(Sel)
But then try_emplace(Sel).first->second is the same as operator[], so
this patch simplifies the rest of the function.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list