[clang] bf3deb1 - [AST] Avoid repeated hash lookups (NFC) (#110947)

via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 3 08:27:58 PDT 2024


Author: Kazu Hirata
Date: 2024-10-03T08:27:54-07:00
New Revision: bf3deb17cbfe8d777890cd54fde48d68150d1738

URL: https://github.com/llvm/llvm-project/commit/bf3deb17cbfe8d777890cd54fde48d68150d1738
DIFF: https://github.com/llvm/llvm-project/commit/bf3deb17cbfe8d777890cd54fde48d68150d1738.diff

LOG: [AST] Avoid repeated hash lookups (NFC) (#110947)

Added: 
    

Modified: 
    clang/lib/AST/ASTContext.cpp

Removed: 
    


################################################################################
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