[CGOpenMPRuntime] Avoid repeated hash lookups (NFC) (#107358)

This commit is contained in:
Kazu Hirata
2024-09-05 08:36:09 -07:00
committed by GitHub
parent abfb340b77
commit 0593b95ff4

View File

@@ -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;