Skip to content

Commit ac16abb

Browse files
Address comments
1 parent 60edb61 commit ac16abb

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

llvm/utils/TableGen/AsmMatcherEmitter.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,22 +1988,20 @@ emitConvertFuncs(CodeGenTarget &Target, StringRef ClassName,
19881988
CvtOS << " const uint8_t *Converter = ConversionTable[Kind];\n";
19891989
CvtOS << " Inst.setOpcode(Opcode);\n";
19901990
CvtOS << " for (const uint8_t *p = Converter; *p; p += 2) {\n";
1991-
CvtOS << " unsigned OpIdx;\n";
19921991
if (HasOptionalOperands) {
19931992
// When optional operands are involved, formal and actual operand indices
19941993
// may differ. Map the former to the latter by subtracting the number of
19951994
// absent optional operands.
1996-
CvtOS << " OpIdx = *(p + 1) - DefaultsOffset[*(p + 1)];\n";
1995+
CvtOS << " unsigned OpIdx = *(p + 1) - DefaultsOffset[*(p + 1)];\n";
19971996
} else {
1998-
CvtOS << " OpIdx = *(p + 1);\n";
1997+
CvtOS << " unsigned OpIdx = *(p + 1);\n";
19991998
}
20001999
CvtOS << " switch (*p) {\n";
20012000
CvtOS << " default: llvm_unreachable(\"invalid conversion entry!\");\n";
2002-
CvtOS << " case CVT_Reg:{\n";
2001+
CvtOS << " case CVT_Reg:\n";
20032002
CvtOS << " static_cast<" << TargetOperandClass
20042003
<< " &>(*Operands[OpIdx]).addRegOperands(Inst, 1);\n";
20052004
CvtOS << " break;\n";
2006-
CvtOS << " }\n";
20072005
CvtOS << " case CVT_Tied: {\n";
20082006
CvtOS << " assert(*(p + 1) < (size_t)(std::end(TiedAsmOperandTable) -\n";
20092007
CvtOS

0 commit comments

Comments
 (0)