Skip to content

Commit 7938125

Browse files
abhishek-kaushik22aokblast
authored andcommitted
[NFC][TableGen] emitGetOperandIdxName: Pass arg by const& (llvm#164563)
Take `OperandNameToID` by const& to avoid copying
1 parent 51e1031 commit 7938125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/InstrInfoEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ emitGetNamedOperandIdx(raw_ostream &OS,
285285

286286
static void
287287
emitGetOperandIdxName(raw_ostream &OS,
288-
MapVector<StringRef, unsigned> OperandNameToID,
288+
const MapVector<StringRef, unsigned> &OperandNameToID,
289289
const MapVector<SmallVector<int>, unsigned> &OperandMap,
290290
unsigned MaxNumOperands, unsigned NumOperandNames) {
291291
OS << "LLVM_READONLY OpName getOperandIdxName(uint16_t Opcode, int16_t Idx) "

0 commit comments

Comments
 (0)