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 196f7c2 commit df3bc54Copy full SHA for df3bc54
flang/lib/Optimizer/CodeGen/BoxedProcedure.cpp
@@ -69,11 +69,9 @@ class BoxprocTypeRewriter : public mlir::TypeConverter {
69
return false;
70
}
71
if (auto recTy = mlir::dyn_cast<RecordType>(ty)) {
72
- auto visited = visitedTypes.find(ty);
73
- if (visited != visitedTypes.end())
+ auto [visited, inserted] = visitedTypes.try_emplace(ty, false);
+ if (!inserted)
74
return visited->second;
75
- [[maybe_unused]] auto newIt = visitedTypes.try_emplace(ty, false);
76
- assert(newIt.second && "expected ty to not be in the map");
77
bool wasAlreadyVisitingRecordType = needConversionIsVisitingRecordType;
78
needConversionIsVisitingRecordType = true;
79
bool result = false;
0 commit comments