[llvm] e6f98ff - Fix variable naming style in PPCBoolRetToInt.cpp (#144533)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 12:00:23 PDT 2025
Author: Shuqi Liang
Date: 2025-06-23T15:00:19-04:00
New Revision: e6f98ff4a81d6e6b66e164fe799cb5ef87b95682
URL: https://github.com/llvm/llvm-project/commit/e6f98ff4a81d6e6b66e164fe799cb5ef87b95682
DIFF: https://github.com/llvm/llvm-project/commit/e6f98ff4a81d6e6b66e164fe799cb5ef87b95682.diff
LOG: Fix variable naming style in PPCBoolRetToInt.cpp (#144533)
Change loop variable 'i' to 'I' to conform to LLVM coding standards.
Variable names should start with an upper case letter according to LLVM
coding guidelines.
Fixed locations:
Lines 103-104: for loop variable and usage
Lines 257-258: for loop variable and usage
Co-authored-by: Shuqi Liang <Shuqi.Liang at ibm.com>
Added:
Modified:
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
index d0a5be8b2e23a..e6e8a881e610d 100644
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
@@ -100,8 +100,8 @@ class PPCBoolRetToInt : public FunctionPass {
Value *Zero = Constant::getNullValue(IntTy);
PHINode *Q =
PHINode::Create(IntTy, P->getNumIncomingValues(), P->getName(), P->getIterator());
- for (unsigned i = 0; i < P->getNumOperands(); ++i)
- Q->addIncoming(Zero, P->getIncomingBlock(i));
+ for (unsigned I = 0; I < P->getNumOperands(); ++I)
+ Q->addIncoming(Zero, P->getIncomingBlock(I));
return Q;
}
@@ -253,8 +253,8 @@ class PPCBoolRetToInt : public FunctionPass {
// Operands of CallInst/Constant are skipped because they may not be Bool
// type. For CallInst, their positions are defined by ABI.
if (First && !isa<CallInst>(First) && !isa<Constant>(First))
- for (unsigned i = 0; i < First->getNumOperands(); ++i)
- Second->setOperand(i, BoolToIntMap[First->getOperand(i)]);
+ for (unsigned I = 0; I < First->getNumOperands(); ++I)
+ Second->setOperand(I, BoolToIntMap[First->getOperand(I)]);
}
Value *IntRetVal = BoolToIntMap[U];
More information about the llvm-commits
mailing list