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 7fa1936 commit efae9f3Copy full SHA for efae9f3
llvm/lib/CodeGen/MIRParser/MIParser.cpp
@@ -1316,9 +1316,10 @@ bool MIParser::parseMachineMetadata() {
1316
1317
assert(PFS.MachineMetadataNodes[ID] == MD && "Tracking VH didn't work");
1318
} else {
1319
- if (PFS.MachineMetadataNodes.count(ID))
+ auto [It, Inserted] = PFS.MachineMetadataNodes.try_emplace(ID);
1320
+ if (!Inserted)
1321
return error("Metadata id is already used");
- PFS.MachineMetadataNodes[ID].reset(MD);
1322
+ It->second.reset(MD);
1323
}
1324
1325
return false;
0 commit comments