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 9192367 commit 530fe60Copy full SHA for 530fe60
llvm/include/llvm/IR/ModuleSummaryIndex.h
@@ -1711,10 +1711,9 @@ class ModuleSummaryIndex {
1711
GlobalValue::GUID OrigGUID) {
1712
if (OrigGUID == 0 || ValueGUID == OrigGUID)
1713
return;
1714
- if (OidGuidMap.count(OrigGUID) && OidGuidMap[OrigGUID] != ValueGUID)
1715
- OidGuidMap[OrigGUID] = 0;
1716
- else
1717
- OidGuidMap[OrigGUID] = ValueGUID;
+ auto [It, Inserted] = OidGuidMap.try_emplace(OrigGUID, ValueGUID);
+ if (!Inserted && It->second != ValueGUID)
+ It->second = 0;
1718
}
1719
1720
/// Find the summary for ValueInfo \p VI in module \p ModuleId, or nullptr if
0 commit comments