From 4e8c9d28132039a98feb97cec2759cddeb37d934 Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 16 Jan 2025 13:20:41 +0000 Subject: [TableGen] Use std::pair instead of std::make_pair. NFC. (#123174) Also use brace initialization and emplace to avoid explicitly constructing std::pair, and the same for std::tuple. --- llvm/utils/TableGen/X86DisassemblerTables.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/utils/TableGen/X86DisassemblerTables.cpp') diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp index 294923b..5e7983a 100644 --- a/llvm/utils/TableGen/X86DisassemblerTables.cpp +++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp @@ -874,7 +874,7 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o, for (auto Operand : InstructionSpecifiers[Index].operands) { OperandEncoding Encoding = (OperandEncoding)Operand.encoding; OperandType Type = (OperandType)Operand.type; - OperandList.push_back(std::pair(Encoding, Type)); + OperandList.emplace_back(Encoding, Type); } unsigned &N = OperandSets[OperandList]; if (N != 0) @@ -906,7 +906,7 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o, for (auto Operand : InstructionSpecifiers[index].operands) { OperandEncoding Encoding = (OperandEncoding)Operand.encoding; OperandType Type = (OperandType)Operand.type; - OperandList.push_back(std::pair(Encoding, Type)); + OperandList.emplace_back(Encoding, Type); } o.indent(i * 2) << (OperandSets[OperandList] - 1) << ",\n"; -- cgit v1.1