[clang] [AST] Avoid repeated hash lookups (NFC) (PR #110947)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 2 20:12:23 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/110947.diff
1 Files Affected:
- (modified) clang/lib/AST/ASTContext.cpp (-2)
``````````diff
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));
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/110947
More information about the cfe-commits
mailing list