[clang] [AST] Avoid repeated hash lookups (NFC) (PR #110947)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 20:11:52 PDT 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/110947
None
>From 75622baf2f2bb12c46ca501f1f9b26afa0503e6b Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Wed, 2 Oct 2024 06:59:47 -0700
Subject: [PATCH] [AST] Avoid repeated hash lookups (NFC)
---
clang/lib/AST/ASTContext.cpp | 2 --
1 file changed, 2 deletions(-)
diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp
index 735def67f7840f..a81429ad6a2380 100644
--- a/clang/lib/AST/ASTContext.cpp
+++ b/clang/lib/AST/ASTContext.cpp
@@ -14439,8 +14439,6 @@ bool ASTContext::useAbbreviatedThunkName(GlobalDecl VirtualMethodDecl,
Mangler->mangleThunk(Method, Thunk, /* elideOverrideInfo */ false,
mangledNameStream);
- if (Thunks.find(ElidedName) == Thunks.end())
- Thunks[ElidedName] = {};
Thunks[ElidedName].push_back(std::string(MangledName));
}
}
More information about the cfe-commits
mailing list