Skip to content

Commit 3080c80

Browse files
[PowerPC] Use range-based for loops (NFC) (#104410)
1 parent dfa13c0 commit 3080c80

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3388,17 +3388,15 @@ static void updateForAIXShLibTLSModelOpt(TLSModel::Model &Model,
33883388
// global variables (global variables taken as the first parameter to
33893389
// Intrinsic::threadlocal_address).
33903390
const Function &Func = DAG.getMachineFunction().getFunction();
3391-
for (Function::const_iterator BI = Func.begin(), BE = Func.end(); BI != BE;
3392-
++BI)
3393-
for (BasicBlock::const_iterator II = BI->begin(), IE = BI->end();
3394-
II != IE; ++II)
3395-
if (II->getOpcode() == Instruction::Call)
3396-
if (const CallInst *CI = dyn_cast<const CallInst>(&*II))
3391+
for (const BasicBlock &BB : Func)
3392+
for (const Instruction &I : BB)
3393+
if (I.getOpcode() == Instruction::Call)
3394+
if (const CallInst *CI = dyn_cast<const CallInst>(&I))
33973395
if (Function *CF = CI->getCalledFunction())
33983396
if (CF->isDeclaration() &&
33993397
CF->getIntrinsicID() == Intrinsic::threadlocal_address)
34003398
if (const GlobalValue *GV =
3401-
dyn_cast<GlobalValue>(II->getOperand(0))) {
3399+
dyn_cast<GlobalValue>(I.getOperand(0))) {
34023400
TLSModel::Model GVModel = TM.getTLSModel(GV);
34033401
if (GVModel == TLSModel::LocalDynamic)
34043402
TLSGV.insert(GV);

0 commit comments

Comments
 (0)