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 bfa8519 commit 619688fCopy full SHA for 619688f
llvm/lib/IR/AsmWriter.cpp
@@ -1338,12 +1338,8 @@ void SlotTracker::CreateMetadataSlot(const MDNode *N) {
1338
void SlotTracker::CreateAttributeSetSlot(AttributeSet AS) {
1339
assert(AS.hasAttributes() && "Doesn't need a slot!");
1340
1341
- as_iterator I = asMap.find(AS);
1342
- if (I != asMap.end())
1343
- return;
1344
-
1345
- unsigned DestSlot = asNext++;
1346
- asMap[AS] = DestSlot;
+ if (asMap.try_emplace(AS, asNext).second)
+ ++asNext;
1347
}
1348
1349
/// Create a new slot for the specified Module
0 commit comments