https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/107358
None >From 7d9d7495ab3ea573e8c0a6c087296b6c43c95a65 Mon Sep 17 00:00:00 2001 From: Kazu Hirata <k...@google.com> Date: Wed, 4 Sep 2024 23:52:55 -0700 Subject: [PATCH] [CGOpenMPRuntime] Avoid repeated hash lookups (NFC) --- clang/lib/CodeGen/CGOpenMPRuntime.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 3d392d869ee39c..9cf597a65be043 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -11674,9 +11674,7 @@ CGOpenMPRuntime::LastprivateConditionalRAII::~LastprivateConditionalRAII() { Address CGOpenMPRuntime::emitLastprivateConditionalInit(CodeGenFunction &CGF, const VarDecl *VD) { ASTContext &C = CGM.getContext(); - auto I = LastprivateConditionalToTypes.find(CGF.CurFn); - if (I == LastprivateConditionalToTypes.end()) - I = LastprivateConditionalToTypes.try_emplace(CGF.CurFn).first; + auto I = LastprivateConditionalToTypes.try_emplace(CGF.CurFn).first; QualType NewType; const FieldDecl *VDField; const FieldDecl *FiredField; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits