Skip to content

Commit cec5296

Browse files
[TableGen] Use const auto& instead of auto to avoid copy (#113053)
1 parent 58c8d73 commit cec5296

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/InstrDocsEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static void EmitInstrDocs(const RecordKeeper &RK, raw_ostream &OS) {
159159
// Operands.
160160
for (unsigned i = 0; i < II->Operands.size(); ++i) {
161161
bool IsDef = i < II->Operands.NumDefs;
162-
auto Op = II->Operands[i];
162+
const auto &Op = II->Operands[i];
163163

164164
if (Op.MINumOperands > 1) {
165165
// This operand corresponds to multiple operands on the

0 commit comments

Comments
 (0)