[llvm] [IR] Remove unnecessary casts from IntegerType::get. NFC (PR #150299)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 23 12:55:20 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/IR/Type.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/Type.cpp b/llvm/lib/IR/Type.cpp
index 6302614bc..d940b5f41 100644
--- a/llvm/lib/IR/Type.cpp
+++ b/llvm/lib/IR/Type.cpp
@@ -324,12 +324,18 @@ IntegerType *IntegerType::get(LLVMContext &C, unsigned NumBits) {
// Check for the built-in integer types
switch (NumBits) {
- case 1: return Type::getInt1Ty(C);
- case 8: return Type::getInt8Ty(C);
- case 16: return Type::getInt16Ty(C);
- case 32: return Type::getInt32Ty(C);
- case 64: return Type::getInt64Ty(C);
- case 128: return Type::getInt128Ty(C);
+ case 1:
+ return Type::getInt1Ty(C);
+ case 8:
+ return Type::getInt8Ty(C);
+ case 16:
+ return Type::getInt16Ty(C);
+ case 32:
+ return Type::getInt32Ty(C);
+ case 64:
+ return Type::getInt64Ty(C);
+ case 128:
+ return Type::getInt128Ty(C);
default:
break;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/150299
More information about the llvm-commits
mailing list