[llvm] [IPO] Remove a redundant cast (NFC) (PR #168297)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 16 15:08:10 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/168297
Idx is already of type unsigned.
Identified with readability-redundant-casting.
>From bae0b13a27b358a52de3c1f216ee42d62c088373 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 16 Nov 2025 14:08:42 -0800
Subject: [PATCH] [IPO] Remove a redundant cast (NFC)
Idx is already of type unsigned.
Identified with readability-redundant-casting.
---
llvm/lib/Transforms/IPO/IROutliner.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/llvm/lib/Transforms/IPO/IROutliner.cpp b/llvm/lib/Transforms/IPO/IROutliner.cpp
index e6ddc8029ce7b..6e1ca9c4cd2d6 100644
--- a/llvm/lib/Transforms/IPO/IROutliner.cpp
+++ b/llvm/lib/Transforms/IPO/IROutliner.cpp
@@ -2108,8 +2108,7 @@ static void createAndInsertBasicBlocks(DenseMap<Value *, BasicBlock *> &OldMap,
for (Value *RetVal : SortedKeys) {
BasicBlock *NewBB = BasicBlock::Create(
- ParentFunc->getContext(),
- Twine(BaseName) + Twine("_") + Twine(static_cast<unsigned>(Idx++)),
+ ParentFunc->getContext(), Twine(BaseName) + Twine("_") + Twine(Idx++),
ParentFunc);
NewMap.insert(std::make_pair(RetVal, NewBB));
}
More information about the llvm-commits
mailing list