Skip to content

Commit e3ee9ad

Browse files
toppercmahesh-attarde
authored andcommitted
[IR] Remove unnecessary casts from IntegerType::get. NFC (llvm#150299)
1 parent adad119 commit e3ee9ad

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

llvm/lib/IR/Type.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,12 +324,12 @@ IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) {
324324

325325
// Check for the built-in integer types
326326
switch (NumBits) {
327-
case 1: return cast<IntegerType>(Type::getInt1Ty(C));
328-
case 8: return cast<IntegerType>(Type::getInt8Ty(C));
329-
case 16: return cast<IntegerType>(Type::getInt16Ty(C));
330-
case 32: return cast<IntegerType>(Type::getInt32Ty(C));
331-
case 64: return cast<IntegerType>(Type::getInt64Ty(C));
332-
case 128: return cast<IntegerType>(Type::getInt128Ty(C));
327+
case 1: return Type::getInt1Ty(C);
328+
case 8: return Type::getInt8Ty(C);
329+
case 16: return Type::getInt16Ty(C);
330+
case 32: return Type::getInt32Ty(C);
331+
case 64: return Type::getInt64Ty(C);
332+
case 128: return Type::getInt128Ty(C);
333333
default:
334334
break;
335335
}

0 commit comments

Comments
 (0)