llvm.org GIT mirror llvm / e615914
Fix some Clang-tidy modernize-use-default and Include What You Use warnings; other minor fixes (NFC). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288285 91177308-0d34-0410-b5e6-96231b3b80d8 Eugene Zelenko 3 years ago
5 changed file(s) with 51 addition(s) and 34 deletion(s). Raw diff Collapse all Expand all
1616 #define LLVM_ADT_POSTORDERITERATOR_H
1717
1818 #include "llvm/ADT/GraphTraits.h"
19 #include "llvm/ADT/SmallPtrSet.h"
2019 #include "llvm/ADT/iterator_range.h"
2120 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/SmallPtrSet.h"
22 #include
2223 #include
24 #include
2325 #include
2426
2527 namespace llvm {
5456 template
5557 class po_iterator_storage {
5658 SetType Visited;
59
5760 public:
5861 // Return true if edge destination should be visited.
5962 template
6972 template
7073 class po_iterator_storage {
7174 SetType &Visited;
75
7276 public:
7377 po_iterator_storage(SetType &VSet) : Visited(VSet) {}
7478 po_iterator_storage(const po_iterator_storage &S) : Visited(S.Visited) {}
8690
8791 template
8892 class SetType =
89 llvm::SmallPtrSet::NodeRef, 8>,
93 SmallPtrSet::NodeRef, 8>,
9094 bool ExtStorage = false, class GT = GraphTraits>
9195 class po_iterator
9296 : public std::iterator,
114118 VisitStack.push_back(std::make_pair(BB, GT::child_begin(BB)));
115119 traverseChild();
116120 }
117 po_iterator() {} // End is when stack is empty.
121
122 po_iterator() = default; // End is when stack is empty.
118123
119124 po_iterator(NodeRef BB, SetType &S)
120125 : po_iterator_storage(S) {
127132 po_iterator(SetType &S)
128133 : po_iterator_storage(S) {
129134 } // End is when stack is empty.
135
130136 public:
131137 typedef typename super::pointer pointer;
132138
273279 // }
274280 //
275281
276 template >
282 template>
277283 class ReversePostOrderTraversal {
278284 typedef typename GT::NodeRef NodeRef;
279285 std::vector Blocks; // Block list in normal PO order
286
280287 void Initialize(NodeRef BB) {
281288 std::copy(po_begin(BB), po_end(BB), std::back_inserter(Blocks));
282289 }
290
283291 public:
284292 typedef typename std::vector::reverse_iterator rpo_iterator;
285293
290298 rpo_iterator end() { return Blocks.rend(); }
291299 };
292300
293 } // End llvm namespace
294
295 #endif
301 } // end namespace llvm
302
303 #endif // LLVM_ADT_POSTORDERITERATOR_H
1818 #include "llvm/ADT/DenseMap.h"
1919 #include "llvm/ADT/STLExtras.h"
2020 #include "llvm/ADT/SmallVector.h"
21 #include "llvm/Support/Compiler.h"
2122 #include
2223 #include
23 #include <utility>
24 #include <cstddef>
2425 #include
2526
2627 namespace llvm {
5960 typedef typename MapT::size_type size_type;
6061
6162 /// Construct an empty PriorityWorklist
62 PriorityWorklist() {}
63 PriorityWorklist() = default;
6364
6465 /// Determine if the PriorityWorklist is empty or not.
6566 bool empty() const {
216217 : public PriorityWorklist,
217218 SmallDenseMap> {
218219 public:
219 SmallPriorityWorklist() {}
220 SmallPriorityWorklist() = default;
220221 };
221222
222 }
223
224 #endif
223 } // end namespace llvm
224
225 #endif // LLVM_ADT_PRIORITYWORKLIST_H
2525 #include "llvm/ADT/DenseMap.h"
2626 #include "llvm/ADT/GraphTraits.h"
2727 #include "llvm/ADT/iterator.h"
28 #include
29 #include
30 #include
2831 #include
2932
3033 namespace llvm {
9295 }
9396
9497 /// End is when the DFS stack is empty.
95 scc_iterator() {}
98 scc_iterator() = default;
9699
97100 public:
98101 static scc_iterator begin(const GraphT &G) {
229232 }
230233
231234 /// \brief Construct the begin iterator for a deduced graph type T's Inverse.
232 template scc_iterator > scc_begin(const Inverse &G) {
233 return scc_iterator >::begin(G);
235 template scc_iterator> scc_begin(const Inverse &G) {
236 return scc_iterator>::begin(G);
234237 }
235238
236239 /// \brief Construct the end iterator for a deduced graph type T's Inverse.
237 template scc_iterator > scc_end(const Inverse &G) {
238 return scc_iterator >::end(G);
239 }
240
241 } // End llvm namespace
242
243 #endif
240 template scc_iterator> scc_end(const Inverse &G) {
241 return scc_iterator>::end(G);
242 }
243
244 } // end namespace llvm
245
246 #endif // LLVM_ADT_SCCITERATOR_H
1919 #ifndef LLVM_ADT_SETVECTOR_H
2020 #define LLVM_ADT_SETVECTOR_H
2121
22 #include "llvm/ADT/ArrayRef.h"
2223 #include "llvm/ADT/DenseSet.h"
2324 #include "llvm/ADT/STLExtras.h"
24 #include "llvm/ADT/SmallSet.h"
25 #include "llvm/Support/Compiler.h"
2526 #include
2627 #include
27 #include <utility>
28 #include <iterator>
2829 #include
2930
3031 namespace llvm {
5152 typedef typename vector_type::size_type size_type;
5253
5354 /// \brief Construct an empty SetVector
54 SetVector() {}
55 SetVector() = default;
5556
5657 /// \brief Initialize a SetVector with a range of elements
5758 template
284285 class SmallSetVector
285286 : public SetVector, SmallDenseSet> {
286287 public:
287 SmallSetVector() {}
288 SmallSetVector() = default;
288289
289290 /// \brief Initialize a SmallSetVector with a range of elements
290291 template
293294 }
294295 };
295296
296 } // End llvm namespace
297
298 // vim: sw=2 ai
299 #endif
297 } // end namespace llvm
298
299 #endif // LLVM_ADT_SETVECTOR_H
1616 #include "llvm/ADT/None.h"
1717 #include "llvm/ADT/SmallPtrSet.h"
1818 #include "llvm/ADT/SmallVector.h"
19 #include "llvm/Support/Compiler.h"
20 #include
21 #include
1922 #include
23 #include
2024
2125 namespace llvm {
2226
2731 ///
2832 /// Note that this set does not provide a way to iterate over members in the
2933 /// set.
30 template typename C = std::less >
34 template typename C = std::less>
3135 class SmallSet {
3236 /// Use a SmallVector to hold the elements here (even though it will never
3337 /// reach its 'large' stage) to avoid calling the default ctors of elements
4448
4549 public:
4650 typedef size_t size_type;
47 SmallSet() {}
51
52 SmallSet() = default;
4853
4954 LLVM_NODISCARD bool empty() const {
5055 return Vector.empty() && Set.empty();
132137
133138 } // end namespace llvm
134139
135 #endif
140 #endif // LLVM_ADT_SMALLSET_H