[clang] 0593b95 - [CGOpenMPRuntime] Avoid repeated hash lookups (NFC) (#107358)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 5 08:36:12 PDT 2024
Author: Kazu Hirata
Date: 2024-09-05T08:36:09-07:00
New Revision: 0593b95ff4c459ccf71f9472c148967d40f6d865
URL: https://github.com/llvm/llvm-project/commit/0593b95ff4c459ccf71f9472c148967d40f6d865
DIFF: https://github.com/llvm/llvm-project/commit/0593b95ff4c459ccf71f9472c148967d40f6d865.diff
LOG: [CGOpenMPRuntime] Avoid repeated hash lookups (NFC) (#107358)
Added:
Modified:
clang/lib/CodeGen/CGOpenMPRuntime.cpp
Removed:
################################################################################
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;
More information about the cfe-commits
mailing list