diff --git a/llvm/utils/TableGen/InstrDocsEmitter.cpp b/llvm/utils/TableGen/InstrDocsEmitter.cpp index 5f22fb417198..54ca7d8ae40d 100644 --- a/llvm/utils/TableGen/InstrDocsEmitter.cpp +++ b/llvm/utils/TableGen/InstrDocsEmitter.cpp @@ -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