File tree 1 file changed +3
-5
lines changed
llvm/lib/CodeGen/LiveDebugValues
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2231,11 +2231,9 @@ void InstrRefBasedLDV::accumulateFragmentMap(MachineInstr &MI) {
2231
2231
// If this is the first sighting of this variable, then we are guaranteed
2232
2232
// there are currently no overlapping fragments either. Initialize the set
2233
2233
// of seen fragments, record no overlaps for the current one, and return.
2234
- auto SeenIt = SeenFragments.find (MIVar.getVariable ());
2235
- if (SeenIt == SeenFragments.end ()) {
2236
- SmallSet<FragmentInfo, 4 > OneFragment;
2237
- OneFragment.insert (ThisFragment);
2238
- SeenFragments.insert ({MIVar.getVariable (), OneFragment});
2234
+ auto [SeenIt, Inserted] = SeenFragments.try_emplace (MIVar.getVariable ());
2235
+ if (Inserted) {
2236
+ SeenIt->second .insert (ThisFragment);
2239
2237
2240
2238
OverlapFragments.insert ({{MIVar.getVariable (), ThisFragment}, {}});
2241
2239
return ;
You can’t perform that action at this time.
0 commit comments