Skip to content

Commit 1939bd3

Browse files
committed
[TableGen] Remove unnecessary use of utostr when writing to raw_ostream. NFC
1 parent 17eb05d commit 1939bd3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

llvm/utils/TableGen/CodeEmitterGen.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ bool CodeEmitterGen::addCodeToMergeInOperand(const Record *R,
154154
raw_string_ostream CaseOS(Case);
155155
CaseOS << indent(6);
156156
if (UseAPInt) {
157-
CaseOS << EncoderMethodName << "(MI, " + utostr(OpIdx) << ", op";
157+
CaseOS << EncoderMethodName << "(MI, " << OpIdx << ", op";
158158
} else {
159-
CaseOS << "op = " << EncoderMethodName << "(MI, " << utostr(OpIdx);
159+
CaseOS << "op = " << EncoderMethodName << "(MI, " << OpIdx;
160160
}
161161
CaseOS << ", Fixups, STI);\n";
162162
} else {
@@ -388,8 +388,7 @@ void CodeEmitterGen::addInstructionCasesForEncoding(
388388

389389
static void emitInstBits(raw_ostream &OS, const APInt &Bits) {
390390
for (unsigned I = 0; I < Bits.getNumWords(); ++I)
391-
OS << ((I > 0) ? ", " : "") << "UINT64_C(" << utostr(Bits.getRawData()[I])
392-
<< ")";
391+
OS << ((I > 0) ? ", " : "") << "UINT64_C(" << Bits.getRawData()[I] << ")";
393392
}
394393

395394
void CodeEmitterGen::emitInstructionBaseValues(

0 commit comments

Comments
 (0)