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 b2ea046 commit 8d61f82Copy full SHA for 8d61f82
lld/ELF/Arch/RISCV.cpp
@@ -1074,12 +1074,12 @@ static void mergeArch(RISCVISAInfo::OrderedExtensionMap &mergedExts,
1074
mergedXlen = info.getXLen();
1075
} else {
1076
for (const auto &ext : info.getExtensions()) {
1077
- if (auto it = mergedExts.find(ext.first); it != mergedExts.end()) {
1078
- if (std::tie(it->second.Major, it->second.Minor) >=
+ auto p = mergedExts.insert(ext);
+ if (!p.second) {
1079
+ if (std::tie(p.first->second.Major, p.first->second.Minor) <
1080
std::tie(ext.second.Major, ext.second.Minor))
- continue;
1081
+ p.first->second = ext.second;
1082
}
- mergedExts[ext.first] = ext.second;
1083
1084
1085
0 commit comments