Skip to content

Commit ba7a0b7

Browse files
[Frontend] Avoid repeated hash lookups (NFC) (#108738)
1 parent ddca79a commit ba7a0b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/Frontend/Rewrite/RewriteObjC.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -4111,9 +4111,8 @@ void RewriteObjC::RewriteBlockPointerDecl(NamedDecl *ND) {
41114111
std::string RewriteObjC::SynthesizeByrefCopyDestroyHelper(VarDecl *VD,
41124112
int flag) {
41134113
std::string S;
4114-
if (CopyDestroyCache.count(flag))
4114+
if (!CopyDestroyCache.insert(flag).second)
41154115
return S;
4116-
CopyDestroyCache.insert(flag);
41174116
S = "static void __Block_byref_id_object_copy_";
41184117
S += utostr(flag);
41194118
S += "(void *dst, void *src) {\n";

0 commit comments

Comments
 (0)