Skip to content

Commit e5aac52

Browse files
[AST] Avoid repeated hash lookups (NFC) (llvm#130887)
1 parent bdbe8fa commit e5aac52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/ASTContext.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -11832,8 +11832,8 @@ bool ASTContext::mergeExtParameterInfo(
1183211832
}
1183311833

1183411834
void ASTContext::ResetObjCLayout(const ObjCInterfaceDecl *D) {
11835-
if (ObjCLayouts.count(D)) {
11836-
ObjCLayouts[D] = nullptr;
11835+
if (auto It = ObjCLayouts.find(D); It != ObjCLayouts.end()) {
11836+
It->second = nullptr;
1183711837
for (auto *SubClass : ObjCSubClasses[D])
1183811838
ResetObjCLayout(SubClass);
1183911839
}

0 commit comments

Comments
 (0)