We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be79a0d commit da06d9eCopy full SHA for da06d9e
llvm/lib/CodeGen/CFIInstrInserter.cpp
@@ -279,10 +279,8 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
279
}
280
if (CSRReg || CSROffset) {
281
CSRSavedLocation Loc(CSRReg, CSROffset);
282
- auto It = CSRLocMap.find(CFI.getRegister());
283
- if (It == CSRLocMap.end()) {
284
- CSRLocMap.insert({CFI.getRegister(), Loc});
285
- } else if (It->second != Loc) {
+ auto [It, Inserted] = CSRLocMap.insert({CFI.getRegister(), Loc});
+ if (!Inserted && It->second != Loc) {
286
reportFatalInternalError(
287
"Different saved locations for the same CSR");
288
0 commit comments