Skip to content

Commit f578982

Browse files
committed
[TableGen] Remove unnecessary const_cast. NFC
1 parent 6f7570c commit f578982

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/utils/TableGen/DecoderEmitter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ static const BitsInit &getBitsField(const Record &def, StringRef str) {
249249
Bits.push_back(BI->getBit(Idx));
250250
}
251251
} else if (const BitInit *BI = dyn_cast<BitInit>(SI.Value)) {
252-
Bits.push_back(const_cast<BitInit *>(BI));
252+
Bits.push_back(BI);
253253
} else {
254254
for (unsigned Idx = 0U; Idx < SI.BitWidth; ++Idx)
255255
Bits.push_back(UnsetInit::get(def.getRecords()));

0 commit comments

Comments
 (0)