[TableGen] Use const auto& instead of auto to avoid copy (#113053)

This commit is contained in:
abhishek-kaushik22
2024-11-22 01:52:47 +08:00
committed by GitHub
parent 58c8d73172
commit cec52960fd

View File

@@ -159,7 +159,7 @@ static void EmitInstrDocs(const RecordKeeper &RK, raw_ostream &OS) {
// Operands.
for (unsigned i = 0; i < II->Operands.size(); ++i) {
bool IsDef = i < II->Operands.NumDefs;
auto Op = II->Operands[i];
const auto &Op = II->Operands[i];
if (Op.MINumOperands > 1) {
// This operand corresponds to multiple operands on the