Skip to content

Commit 0ce253d

Browse files
committed
XCore: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250788
1 parent ac65b4c commit 0ce253d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

llvm/lib/Target/XCore/XCoreISelLowering.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1565,8 +1565,7 @@ XCoreTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI,
15651565
// to set, the condition code register to branch on, the true/false values to
15661566
// select between, and a branch opcode to use.
15671567
const BasicBlock *LLVM_BB = BB->getBasicBlock();
1568-
MachineFunction::iterator It = BB;
1569-
++It;
1568+
MachineFunction::iterator It = ++BB->getIterator();
15701569

15711570
// thisMBB:
15721571
// ...

llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -228,12 +228,9 @@ bool XCoreLowerThreadLocal::runOnModule(Module &M) {
228228
// Find thread local globals.
229229
bool MadeChange = false;
230230
SmallVector<GlobalVariable *, 16> ThreadLocalGlobals;
231-
for (Module::global_iterator GVI = M.global_begin(), E = M.global_end();
232-
GVI != E; ++GVI) {
233-
GlobalVariable *GV = GVI;
234-
if (GV->isThreadLocal())
235-
ThreadLocalGlobals.push_back(GV);
236-
}
231+
for (GlobalVariable &GV : M.globals())
232+
if (GV.isThreadLocal())
233+
ThreadLocalGlobals.push_back(&GV);
237234
for (unsigned I = 0, E = ThreadLocalGlobals.size(); I != E; ++I) {
238235
MadeChange |= lowerGlobal(ThreadLocalGlobals[I]);
239236
}

0 commit comments

Comments
 (0)