[llvm] bf21156 - [IPO] Remove a redundant cast (NFC) (#168297)

via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 07:59:57 PST 2025


Author: Kazu Hirata
Date: 2025-11-17T07:59:53-08:00
New Revision: bf21156ee69a7c8b27733d037abc0ab108451de9

URL: https://github.com/llvm/llvm-project/commit/bf21156ee69a7c8b27733d037abc0ab108451de9
DIFF: https://github.com/llvm/llvm-project/commit/bf21156ee69a7c8b27733d037abc0ab108451de9.diff

LOG: [IPO] Remove a redundant cast (NFC) (#168297)

Idx is already of type unsigned.

Identified with readability-redundant-casting.

Added: 
    

Modified: 
    llvm/lib/Transforms/IPO/IROutliner.cpp

Removed: 
    


################################################################################
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