File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -2178,11 +2178,9 @@ void llvm::insertDebugValuesForPHIs(BasicBlock *BB,
21782178 auto V = DbgValueMap.find (VI);
21792179 if (V != DbgValueMap.end ()) {
21802180 auto *DbgII = cast<DbgVariableIntrinsic>(V->second );
2181- auto NewDI = NewDbgValueMap.find ({Parent, DbgII});
2182- if (NewDI == NewDbgValueMap.end ()) {
2183- auto *NewDbgII = cast<DbgVariableIntrinsic>(DbgII->clone ());
2184- NewDI = NewDbgValueMap.insert ({{Parent, DbgII}, NewDbgII}).first ;
2185- }
2181+ auto [NewDI, Inserted] = NewDbgValueMap.try_emplace ({Parent, DbgII});
2182+ if (Inserted)
2183+ NewDI->second = cast<DbgVariableIntrinsic>(DbgII->clone ());
21862184 DbgVariableIntrinsic *NewDbgII = NewDI->second ;
21872185 // If PHI contains VI as an operand more than once, we may
21882186 // replaced it in NewDbgII; confirm that it is present.
You can’t perform that action at this time.
0 commit comments