ADT: Do not inherit from std::iterator in ilist_iterator

Inheriting from std::iterator uses more boiler-plate than manual
typedefs.  Avoid that in both ilist_iterator and
MachineInstrBundleIterator.

This has the side effect of removing ilist_iterator from certain ADL
lookups in namespace std; calls to std::next need to be qualified by
"std::" that didn't have to before.  The one case of this in-tree was
operating on a temporary, so I used the more compact operator++.

llvm-svn: 280570
This commit is contained in:
Duncan P. N. Exon Smith
2016-09-03 02:27:35 +00:00
parent 3453d51c51
commit 4e229a7c0a
3 changed files with 13 additions and 19 deletions

View File

@@ -2226,7 +2226,7 @@ void BoUpSLP::setInsertPointAfterBundle(ArrayRef<Value *> VL) {
// Set the insertion point after the last instruction in the bundle. Set the
// debug location to Front.
Builder.SetInsertPoint(BB, next(BasicBlock::iterator(LastInst)));
Builder.SetInsertPoint(BB, ++LastInst->getIterator());
Builder.SetCurrentDebugLocation(Front->getDebugLoc());
}