llvm.org GIT mirror llvm / f0891be
Clean up the minor mess I caused with removing iterator.h. I shall take care of 80-col violations and the FIXME later. (Thanks goodness that I live in another continent, so the monkeypox did not strike me :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80224 91177308-0d34-0410-b5e6-96231b3b80d8 Gabor Greif 10 years ago
18 changed file(s) with 35 addition(s) and 44 deletion(s). Raw diff Collapse all Expand all
3333 #define LLVM_ADT_DEPTHFIRSTITERATOR_H
3434
3535 #include "llvm/ADT/GraphTraits.h"
36 #include "llvm/ADT/iterator.h"
3736 #include "llvm/ADT/SmallPtrSet.h"
3837 #include "llvm/ADT/PointerIntPair.h"
3938 #include
6261 template
6362 class SetType = llvm::SmallPtrSet::NodeType*, 8>,
6463 bool ExtStorage = false, class GT = GraphTraits >
65 class df_iterator : public forward_iterator,
64 class df_iterator : public std::iterator,
65 typename GT::NodeType, ptrdiff_t>,
6666 public df_iterator_storage {
67 typedef forward_iterator super;
67 typedef std::iterator
68 typename GT::NodeType, ptrdiff_t> super;
6869
6970 typedef typename GT::NodeType NodeType;
7071 typedef typename GT::ChildIteratorType ChildItTy;
1414 #ifndef LLVM_ADT_EQUIVALENCECLASSES_H
1515 #define LLVM_ADT_EQUIVALENCECLASSES_H
1616
17 #include "llvm/ADT/iterator.h"
1817 #include "llvm/Support/DataTypes.h"
1918 #include
2019
233232 return L1;
234233 }
235234
236 class member_iterator : public forward_iterator {
237 typedef forward_iterator super;
235 class member_iterator : public std::iterator {
236 typedef std::iterator super;
238237 const ECValue *Node;
239238 friend class EquivalenceClasses;
240239 public:
248247
249248 reference operator*() const {
250249 assert(Node != 0 && "Dereferencing end()!");
251 return Node->getData();
250 return const_cast(Node->getData()); // FIXME
252251 }
253252 reference operator->() const { return operator*(); }
254253
1616 #define LLVM_ADT_POSTORDERITERATOR_H
1717
1818 #include "llvm/ADT/GraphTraits.h"
19 #include "llvm/ADT/iterator.h"
2019 #include "llvm/ADT/SmallPtrSet.h"
2120 #include
2221 #include
4241 class SetType = llvm::SmallPtrSet::NodeType*, 8>,
4342 bool ExtStorage = false,
4443 class GT = GraphTraits >
45 class po_iterator : public forward_iterator<typename GT::NodeType, ptrdiff_t>,
44 class po_iterator : public std::iteratortypename GT::NodeType, ptrdiff_t>,
4645 public po_iterator_storage {
47 typedef forward_iterator<typename GT::NodeType, ptrdiff_t> super;
46 typedef std::iteratortypename GT::NodeType, ptrdiff_t> super;
4847 typedef typename GT::NodeType NodeType;
4948 typedef typename GT::ChildIteratorType ChildItTy;
5049
2121 #define LLVM_ADT_SCCITERATOR_H
2222
2323 #include "llvm/ADT/GraphTraits.h"
24 #include "llvm/ADT/iterator.h"
2524 #include
2625 #include
2726
3433 ///
3534 template >
3635 class scc_iterator
37 : public forward_iterator<std::vector, ptrdiff_t> {
36 : public std::iteratorstd::vector, ptrdiff_t> {
3837 typedef typename GT::NodeType NodeType;
3938 typedef typename GT::ChildIteratorType ChildItTy;
4039 typedef std::vector SccTy;
41 typedef forward_iterator, ptrdiff_t> super;
40 typedef std::iterator, ptrdiff_t> super;
4241 typedef typename super::reference reference;
4342 typedef typename super::pointer pointer;
4443
1818
1919 #include // for std::size_t
2020 #include
21 #include
2122 #include // for std::pair
22 #include "llvm/ADT/iterator.h"
2323
2424 namespace llvm {
2525
1313 #ifndef LLVM_ADT_SMALLVECTOR_H
1414 #define LLVM_ADT_SMALLVECTOR_H
1515
16 #include "llvm/ADT/iterator.h"
1716 #include "llvm/Support/type_traits.h"
1817 #include
1918 #include
3737 #ifndef LLVM_ADT_ILIST_H
3838 #define LLVM_ADT_ILIST_H
3939
40 #include "llvm/ADT/iterator.h"
4140 #include
41 #include
4242
4343 namespace llvm {
4444
139139 //
140140 template
141141 class ilist_iterator
142 : public bidirectional_iterator<NodeTy, ptrdiff_t> {
142 : public std::iteratorNodeTy, ptrdiff_t> {
143143
144144 public:
145145 typedef ilist_traits Traits;
146 typedef bidirectional_iterator<NodeTy, ptrdiff_t> super;
146 typedef std::iteratorNodeTy, ptrdiff_t> super;
147147
148148 typedef typename super::value_type value_type;
149149 typedef typename super::difference_type difference_type;
1919 #include "llvm/Support/CallSite.h"
2020 #include "llvm/Support/ValueHandle.h"
2121 #include "llvm/ADT/DenseMap.h"
22 #include "llvm/ADT/iterator.h"
2322 #include "llvm/ADT/ilist.h"
2423 #include "llvm/ADT/ilist_node.h"
2524 #include
158157 void dump() const;
159158
160159 /// Define an iterator for alias sets... this is just a forward iterator.
161 class iterator : public forward_iterator<PointerRec, ptrdiff_t> {
160 class iterator : public std::iteratorPointerRec, ptrdiff_t> {
162161 PointerRec *CurNode;
163162 public:
164163 explicit iterator(PointerRec *CN = 0) : CurNode(CN) {}
1616 #define LLVM_ANALYSIS_CONSTANTSSCANNER_H
1717
1818 #include "llvm/Support/InstIterator.h"
19 #include "llvm/ADT/iterator.h"
2019
2120 namespace llvm {
2221
1616
1717 #include "llvm/Bitcode/BitCodes.h"
1818 #include
19 #include
1920 #include
2021
2122 namespace llvm {
1515
1616 #include "llvm/Target/TargetRegisterInfo.h"
1717 #include "llvm/ADT/BitVector.h"
18 #include "llvm/ADT/iterator.h"
1918 #include
2019
2120 namespace llvm {
255254 /// returns end().
256255 template
257256 class defusechain_iterator
258 : public forward_iterator<MachineInstr, ptrdiff_t> {
257 : public std::iteratorMachineInstr, ptrdiff_t> {
259258 MachineOperand *Op;
260259 explicit defusechain_iterator(MachineOperand *op) : Op(op) {
261260 // If the first node isn't one we're interested in, advance to one that
268267 }
269268 friend class MachineRegisterInfo;
270269 public:
271 typedef forward_iterator::reference reference;
272 typedef forward_iterator::pointer pointer;
270 typedef std::iterator::reference reference;
271 typedef std::iterator::pointer pointer;
273272
274273 defusechain_iterator(const defusechain_iterator &I) : Op(I.Op) {}
275274 defusechain_iterator() : Op(0) {}
534534 void EmitLiveInCopies(MachineBasicBlock *MBB);
535535 };
536536
537 class SUnitIterator : public forward_iterator<SUnit, ptrdiff_t> {
537 class SUnitIterator : public std::iteratorSUnit, ptrdiff_t> {
538538 SUnit *Node;
539539 unsigned Operand;
540540
2121 #include "llvm/Constants.h"
2222 #include "llvm/ADT/FoldingSet.h"
2323 #include "llvm/ADT/GraphTraits.h"
24 #include "llvm/ADT/iterator.h"
2524 #include "llvm/ADT/ilist_node.h"
2625 #include "llvm/ADT/SmallVector.h"
2726 #include "llvm/ADT/STLExtras.h"
11281127 /// use_iterator - This class provides iterator support for SDUse
11291128 /// operands that use a specific SDNode.
11301129 class use_iterator
1131 : public forward_iterator<SDUse, ptrdiff_t> {
1130 : public std::iteratorSDUse, ptrdiff_t> {
11321131 SDUse *Op;
11331132 explicit use_iterator(SDUse *op) : Op(op) {
11341133 }
11351134 friend class SDNode;
11361135 public:
1137 typedef forward_iterator::reference reference;
1138 typedef forward_iterator::pointer pointer;
1136 typedef std::iterator::reference reference;
1137 typedef std::iterator::pointer pointer;
11391138
11401139 use_iterator(const use_iterator &I) : Op(I.Op) {}
11411140 use_iterator() : Op(0) {}
23532352 };
23542353
23552354
2356 class SDNodeIterator : public forward_iterator<SDNode, ptrdiff_t> {
2355 class SDNodeIterator : public std::iteratorSDNode, ptrdiff_t> {
23572356 SDNode *Node;
23582357 unsigned Operand;
23592358
1717
1818 #include "llvm/ADT/GraphTraits.h"
1919 #include "llvm/ADT/IntrusiveRefCntPtr.h"
20 #include "llvm/ADT/iterator.h"
2120 #include "llvm/ADT/SmallVector.h"
2221 #include "llvm/ADT/StringMap.h"
2322 #include "llvm/ADT/StringSet.h"
241240
242241
243242 /// NodeChildIterator - Another auxiliary class needed by GraphTraits.
244 class NodeChildIterator : public bidirectional_iterator<Node, ptrdiff_t> {
243 class NodeChildIterator : public std::iteratorNode, ptrdiff_t> {
245244 typedef NodeChildIterator ThisType;
246245 typedef Node::container_type::iterator iterator;
247246
1717 #include "llvm/ADT/GraphTraits.h"
1818 #include "llvm/Function.h"
1919 #include "llvm/InstrTypes.h"
20 #include "llvm/ADT/iterator.h"
2120
2221 namespace llvm {
2322
2625 //===--------------------------------------------------------------------===//
2726
2827 template // Predecessor Iterator
29 class PredIterator : public forward_iterator<_Ptr, ptrdiff_t> {
30 typedef forward_iterator<_Ptr, ptrdiff_t> super;
28 class PredIterator : public std::iterator {
29 typedef std::iterator super;
3130 _USE_iterator It;
3231 public:
3332 typedef PredIterator<_Ptr,_USE_iterator> _Self;
8483 //===--------------------------------------------------------------------===//
8584
8685 template // Successor Iterator
87 class SuccIterator : public bidirectional_iterator<BB_, ptrdiff_t> {
86 class SuccIterator : public std::iteratorBB_, ptrdiff_t> {
8887 const Term_ Term;
8988 unsigned idx;
90 typedef bidirectional_iterator<BB_, ptrdiff_t> super;
89 typedef std::iteratorBB_, ptrdiff_t> super;
9190 public:
9291 typedef SuccIterator _Self;
9392 typedef typename super::pointer pointer;
2020 namespace llvm {
2121 template
2222 class generic_gep_type_iterator
23 : public forward_iterator {
24 typedef forward_iterator super;
23 : public std::iterator {
24 typedef std::iterator super;
2525
2626 ItTy OpIt;
2727 const Type *CurTy;
1616 #include "llvm/Support/DataTypes.h"
1717 #include "llvm/System/Atomic.h"
1818 #include "llvm/ADT/GraphTraits.h"
19 #include "llvm/ADT/iterator.h"
2019 #include
2120 #include
2221
2525 #define LLVM_USE_H
2626
2727 #include "llvm/Support/Casting.h"
28 #include "llvm/ADT/iterator.h"
2928 #include "llvm/ADT/PointerIntPair.h"
29 #include
3030
3131 namespace llvm {
3232
157157
158158
159159 template // UserTy == 'User' or 'const User'
160 class value_use_iterator : public forward_iterator {
161 typedef forward_iterator super;
160 class value_use_iterator : public std::iterator {
161 typedef std::iterator super;
162162 typedef value_use_iterator _Self;
163163
164164 Use *U;