Skip to content

Commit a0c43be

Browse files
[TableGen] Avoid repeated hash lookups (NFC) (#107710)
1 parent 9c86a7e commit a0c43be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

llvm/utils/TableGen/DXILEmitter.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -402,10 +402,8 @@ static void emitDXILOperationTable(std::vector<DXILOperationDesc> &Ops,
402402
for (auto &Op : Ops) {
403403
OpStrings.add(Op.OpName);
404404

405-
if (ClassSet.contains(Op.OpClass))
406-
continue;
407-
ClassSet.insert(Op.OpClass);
408-
OpClassStrings.add(Op.OpClass.data());
405+
if (ClassSet.insert(Op.OpClass).second)
406+
OpClassStrings.add(Op.OpClass.data());
409407
}
410408

411409
// Layout names.

0 commit comments

Comments
 (0)