File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change @@ -1629,17 +1629,10 @@ void EmitterBase::EmitBuiltinCG(raw_ostream &OS) {
16291629 for (const auto &OI : kv.second )
16301630 key.push_back (OI.ParamValues [i]);
16311631
1632- auto Found = ParamNumberMap.find (key);
1633- if (Found != ParamNumberMap.end ()) {
1634- // Yes, an existing parameter variable can be reused for this.
1635- ParamNumbers.push_back (Found->second );
1636- continue ;
1637- }
1638-
1639- // No, we need a new parameter variable.
1640- int ExistingIndex = ParamNumberMap.size ();
1641- ParamNumberMap[key] = ExistingIndex;
1642- ParamNumbers.push_back (ExistingIndex);
1632+ // Obtain a new parameter variable if we don't have one.
1633+ int ParamNum =
1634+ ParamNumberMap.try_emplace (key, ParamNumberMap.size ()).first ->second ;
1635+ ParamNumbers.push_back (ParamNum);
16431636 }
16441637
16451638 // Now we're ready to do the pass 2 code generation, which will emit the
You can’t perform that action at this time.
0 commit comments