diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-20 01:07:42 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-10-20 01:07:42 +0000 |
commit | 0ce253d3a9774b8637b3350eb541d305bdea6544 (patch) | |
tree | 82e3d852e9fa4d26faf1674a39800411177d0578 | |
parent | ac65b4c42208bd8a38fca704903c07dd51861d4b (diff) | |
download | llvm-0ce253d3a9774b8637b3350eb541d305bdea6544.zip llvm-0ce253d3a9774b8637b3350eb541d305bdea6544.tar.gz llvm-0ce253d3a9774b8637b3350eb541d305bdea6544.tar.bz2 |
XCore: Remove implicit ilist iterator conversions, NFC
llvm-svn: 250788
-rw-r--r-- | llvm/lib/Target/XCore/XCoreISelLowering.cpp | 3 | ||||
-rw-r--r-- | llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp index d892c79a..2873556 100644 --- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp +++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp @@ -1565,8 +1565,7 @@ XCoreTargetLowering::EmitInstrWithCustomInserter(MachineInstr *MI, // to set, the condition code register to branch on, the true/false values to // select between, and a branch opcode to use. const BasicBlock *LLVM_BB = BB->getBasicBlock(); - MachineFunction::iterator It = BB; - ++It; + MachineFunction::iterator It = ++BB->getIterator(); // thisMBB: // ... diff --git a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp index 996c6f5..f0b7201 100644 --- a/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp +++ b/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp @@ -228,12 +228,9 @@ bool XCoreLowerThreadLocal::runOnModule(Module &M) { // Find thread local globals. bool MadeChange = false; SmallVector<GlobalVariable *, 16> ThreadLocalGlobals; - for (Module::global_iterator GVI = M.global_begin(), E = M.global_end(); - GVI != E; ++GVI) { - GlobalVariable *GV = GVI; - if (GV->isThreadLocal()) - ThreadLocalGlobals.push_back(GV); - } + for (GlobalVariable &GV : M.globals()) + if (GV.isThreadLocal()) + ThreadLocalGlobals.push_back(&GV); for (unsigned I = 0, E = ThreadLocalGlobals.size(); I != E; ++I) { MadeChange |= lowerGlobal(ThreadLocalGlobals[I]); } |