llvm.org GIT mirror llvm / b62ba77
s/static inline/static/ for headers I have changed in r279475. NFC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280257 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Shen 3 years ago
16 changed file(s) with 60 addition(s) and 96 deletion(s). Raw diff Collapse all Expand all
419419 typedef mapped_iterator
420420 ChildIteratorType;
421421
422 static inline ChildIteratorType child_begin(NodeRef N) {
422 static ChildIteratorType child_begin(NodeRef N) {
423423 return ChildIteratorType(N->begin(), &CGNGetValue);
424424 }
425 static inline ChildIteratorType child_end(NodeRef N) {
425 static ChildIteratorType child_end(NodeRef N) {
426426 return ChildIteratorType(N->end(), &CGNGetValue);
427427 }
428428 };
439439 typedef mapped_iterator
440440 ChildIteratorType;
441441
442 static inline ChildIteratorType child_begin(NodeRef N) {
442 static ChildIteratorType child_begin(NodeRef N) {
443443 return ChildIteratorType(N->begin(), &CGNGetValue);
444444 }
445 static inline ChildIteratorType child_end(NodeRef N) {
445 static ChildIteratorType child_end(NodeRef N) {
446446 return ChildIteratorType(N->end(), &CGNGetValue);
447447 }
448448 };
126126 static NodeRef getEntryNode(Interval *I) { return I; }
127127
128128 /// nodes_iterator/begin/end - Allow iteration over all nodes in the graph
129 static inline ChildIteratorType child_begin(NodeRef N) {
130 return succ_begin(N);
131 }
132 static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
129 static ChildIteratorType child_begin(NodeRef N) { return succ_begin(N); }
130 static ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
133131 };
134132
135133 template <> struct GraphTraits > {
136134 typedef Interval *NodeRef;
137135 typedef Interval::pred_iterator ChildIteratorType;
138136 static NodeRef getEntryNode(Inverse G) { return G.Graph; }
139 static inline ChildIteratorType child_begin(NodeRef N) {
140 return pred_begin(N);
141 }
142 static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
137 static ChildIteratorType child_begin(NodeRef N) { return pred_begin(N); }
138 static ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
143139 };
144140
145141 } // End llvm namespace
764764 typedef LoopInfo::iterator ChildIteratorType;
765765
766766 static NodeRef getEntryNode(const Loop *L) { return L; }
767 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
768 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
767 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
768 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
769769 };
770770
771771 template <> struct GraphTraits {
773773 typedef LoopInfo::iterator ChildIteratorType;
774774
775775 static NodeRef getEntryNode(Loop *L) { return L; }
776 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
777 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
776 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
777 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
778778 };
779779
780780 /// \brief Analysis pass that exposes the \c LoopInfo for a function.
732732 typedef MachineBasicBlock::succ_iterator ChildIteratorType;
733733
734734 static NodeRef getEntryNode(MachineBasicBlock *BB) { return BB; }
735 static inline ChildIteratorType child_begin(NodeRef N) {
736 return N->succ_begin();
737 }
738 static inline ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
735 static ChildIteratorType child_begin(NodeRef N) { return N->succ_begin(); }
736 static ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
739737 };
740738
741739 template <> struct GraphTraits {
743741 typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
744742
745743 static NodeRef getEntryNode(const MachineBasicBlock *BB) { return BB; }
746 static inline ChildIteratorType child_begin(NodeRef N) {
747 return N->succ_begin();
748 }
749 static inline ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
744 static ChildIteratorType child_begin(NodeRef N) { return N->succ_begin(); }
745 static ChildIteratorType child_end(NodeRef N) { return N->succ_end(); }
750746 };
751747
752748 // Provide specializations of GraphTraits to be able to treat a
761757 static NodeRef getEntryNode(Inverse G) {
762758 return G.Graph;
763759 }
764 static inline ChildIteratorType child_begin(NodeRef N) {
765 return N->pred_begin();
766 }
767 static inline ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
760 static ChildIteratorType child_begin(NodeRef N) { return N->pred_begin(); }
761 static ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
768762 };
769763
770764 template <> struct GraphTraits > {
773767 static NodeRef getEntryNode(Inverse G) {
774768 return G.Graph;
775769 }
776 static inline ChildIteratorType child_begin(NodeRef N) {
777 return N->pred_begin();
778 }
779 static inline ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
770 static ChildIteratorType child_begin(NodeRef N) { return N->pred_begin(); }
771 static ChildIteratorType child_end(NodeRef N) { return N->pred_end(); }
780772 };
781773
782774
274274 typedef ChildIterator ChildIteratorType;
275275
276276 static NodeRef getEntryNode(NodeRef N) { return N; }
277 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
278 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
277 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
278 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
279279 };
280280
281281 template struct GraphTraits;
165165 typedef MachineLoopInfo::iterator ChildIteratorType;
166166
167167 static NodeRef getEntryNode(const MachineLoop *L) { return L; }
168 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
169 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
168 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
169 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
170170 };
171171
172172 template <> struct GraphTraits {
174174 typedef MachineLoopInfo::iterator ChildIteratorType;
175175
176176 static NodeRef getEntryNode(MachineLoop *L) { return L; }
177 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
178 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
177 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
178 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
179179 };
180180
181181 } // End llvm namespace
680680 template <> struct GraphTraits {
681681 typedef SUnit *NodeRef;
682682 typedef SUnitIterator ChildIteratorType;
683 static inline NodeRef getEntryNode(SUnit *N) { return N; }
684 static inline ChildIteratorType child_begin(NodeRef N) {
683 static NodeRef getEntryNode(SUnit *N) { return N; }
684 static ChildIteratorType child_begin(NodeRef N) {
685685 return SUnitIterator::begin(N);
686686 }
687 static inline ChildIteratorType child_end(NodeRef N) {
687 static ChildIteratorType child_end(NodeRef N) {
688688 return SUnitIterator::end(N);
689689 }
690690 };
21052105 template <> struct GraphTraits {
21062106 typedef SDNode *NodeRef;
21072107 typedef SDNodeIterator ChildIteratorType;
2108 static inline NodeRef getEntryNode(SDNode *N) { return N; }
2109 static inline ChildIteratorType child_begin(NodeRef N) {
2108 static NodeRef getEntryNode(SDNode *N) { return N; }
2109 static ChildIteratorType child_begin(NodeRef N) {
21102110 return SDNodeIterator::begin(N);
21112111 }
2112 static inline ChildIteratorType child_end(NodeRef N) {
2112 static ChildIteratorType child_end(NodeRef N) {
21132113 return SDNodeIterator::end(N);
21142114 }
21152115 };
157157 typedef succ_iterator ChildIteratorType;
158158
159159 static NodeRef getEntryNode(BasicBlock *BB) { return BB; }
160 static inline ChildIteratorType child_begin(NodeRef N) {
161 return succ_begin(N);
162 }
163 static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
160 static ChildIteratorType child_begin(NodeRef N) { return succ_begin(N); }
161 static ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
164162 };
165163
166164 template <> struct GraphTraits {
169167
170168 static NodeRef getEntryNode(const BasicBlock *BB) { return BB; }
171169
172 static inline ChildIteratorType child_begin(NodeRef N) {
173 return succ_begin(N);
174 }
175 static inline ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
170 static ChildIteratorType child_begin(NodeRef N) { return succ_begin(N); }
171 static ChildIteratorType child_end(NodeRef N) { return succ_end(N); }
176172 };
177173
178174 // Provide specializations of GraphTraits to be able to treat a function as a
184180 typedef BasicBlock *NodeRef;
185181 typedef pred_iterator ChildIteratorType;
186182 static NodeRef getEntryNode(Inverse G) { return G.Graph; }
187 static inline ChildIteratorType child_begin(NodeRef N) {
188 return pred_begin(N);
189 }
190 static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
183 static ChildIteratorType child_begin(NodeRef N) { return pred_begin(N); }
184 static ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
191185 };
192186
193187 template <> struct GraphTraits > {
194188 typedef const BasicBlock *NodeRef;
195189 typedef const_pred_iterator ChildIteratorType;
196190 static NodeRef getEntryNode(Inverse G) { return G.Graph; }
197 static inline ChildIteratorType child_begin(NodeRef N) {
198 return pred_begin(N);
199 }
200 static inline ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
191 static ChildIteratorType child_begin(NodeRef N) { return pred_begin(N); }
192 static ChildIteratorType child_end(NodeRef N) { return pred_end(N); }
201193 };
202194
203195
159159 typedef df_iterator> nodes_iterator;
160160
161161 static NodeRef getEntryNode(NodeRef N) { return N; }
162 static inline ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
163 static inline ChildIteratorType child_end(NodeRef N) { return N->end(); }
162 static ChildIteratorType child_begin(NodeRef N) { return N->begin(); }
163 static ChildIteratorType child_end(NodeRef N) { return N->end(); }
164164
165165 static nodes_iterator nodes_begin(NodeRef N) {
166166 return df_begin(getEntryNode(N));
431431 typedef Type *NodeRef;
432432 typedef Type::subtype_iterator ChildIteratorType;
433433
434 static inline NodeRef getEntryNode(Type *T) { return T; }
435 static inline ChildIteratorType child_begin(NodeRef N) {
436 return N->subtype_begin();
437 }
438 static inline ChildIteratorType child_end(NodeRef N) {
439 return N->subtype_end();
440 }
434 static NodeRef getEntryNode(Type *T) { return T; }
435 static ChildIteratorType child_begin(NodeRef N) { return N->subtype_begin(); }
436 static ChildIteratorType child_end(NodeRef N) { return N->subtype_end(); }
441437 };
442438
443439 template <> struct GraphTraits {
444440 typedef const Type *NodeRef;
445441 typedef Type::subtype_iterator ChildIteratorType;
446442
447 static inline NodeRef getEntryNode(NodeRef T) { return T; }
448 static inline ChildIteratorType child_begin(NodeRef N) {
449 return N->subtype_begin();
450 }
451 static inline ChildIteratorType child_end(NodeRef N) {
452 return N->subtype_end();
453 }
443 static NodeRef getEntryNode(NodeRef T) { return T; }
444 static ChildIteratorType child_begin(NodeRef N) { return N->subtype_begin(); }
445 static ChildIteratorType child_end(NodeRef N) { return N->subtype_end(); }
454446 };
455447
456448 // Create wrappers for C Binding types (see CBindingWrapping.h).
879879 using ChildIteratorType = memoryaccess_def_iterator;
880880
881881 static NodeRef getEntryNode(NodeRef N) { return N; }
882 static inline ChildIteratorType child_begin(NodeRef N) {
883 return N->defs_begin();
884 }
885 static inline ChildIteratorType child_end(NodeRef N) { return N->defs_end(); }
882 static ChildIteratorType child_begin(NodeRef N) { return N->defs_begin(); }
883 static ChildIteratorType child_end(NodeRef N) { return N->defs_end(); }
886884 };
887885
888886 template <> struct GraphTraits> {
890888 using ChildIteratorType = MemoryAccess::iterator;
891889
892890 static NodeRef getEntryNode(NodeRef N) { return N; }
893 static inline ChildIteratorType child_begin(NodeRef N) {
894 return N->user_begin();
895 }
896 static inline ChildIteratorType child_end(NodeRef N) { return N->user_end(); }
891 static ChildIteratorType child_begin(NodeRef N) { return N->user_begin(); }
892 static ChildIteratorType child_end(NodeRef N) { return N->user_end(); }
897893 };
898894
899895 /// \brief Provide an iterator that walks defs, giving both the memory access,
6363 typedef succ_const_iterator ChildIteratorType;
6464 typedef pointer_iterator nodes_iterator;
6565
66 static inline NodeRef getEntryNode(const BlockFrequencyInfo *G) {
66 static NodeRef getEntryNode(const BlockFrequencyInfo *G) {
6767 return &G->getFunction()->front();
6868 }
6969 static ChildIteratorType child_begin(const NodeRef N) {
5555 typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
5656 typedef pointer_iterator nodes_iterator;
5757
58 static inline NodeRef getEntryNode(const MachineBlockFrequencyInfo *G) {
58 static NodeRef getEntryNode(const MachineBlockFrequencyInfo *G) {
5959 return &G->getFunction()->front();
6060 }
6161
334334 typedef ArgumentGraphNode *NodeRef;
335335 typedef SmallVectorImpl::iterator ChildIteratorType;
336336
337 static inline NodeRef getEntryNode(NodeRef A) { return A; }
338 static inline ChildIteratorType child_begin(NodeRef N) {
339 return N->Uses.begin();
340 }
341 static inline ChildIteratorType child_end(NodeRef N) { return N->Uses.end(); }
337 static NodeRef getEntryNode(NodeRef A) { return A; }
338 static ChildIteratorType child_begin(NodeRef N) { return N->Uses.begin(); }
339 static ChildIteratorType child_end(NodeRef N) { return N->Uses.end(); }
342340 };
343341 template <>
344342 struct GraphTraits : public GraphTraits {
236236 typedef typename Graph::NodeType *NodeRef;
237237 typedef typename Graph::ChildIterator ChildIteratorType;
238238
239 static inline NodeRef getEntryNode(const Graph &G) {
240 return G.AccessNode(0);
241 }
242 static inline ChildIteratorType child_begin(NodeRef Node) {
239 static NodeRef getEntryNode(const Graph &G) { return G.AccessNode(0); }
240 static ChildIteratorType child_begin(NodeRef Node) {
243241 return Graph::child_begin(Node);
244242 }
245 static inline ChildIteratorType child_end(NodeRef Node) {
243 static ChildIteratorType child_end(NodeRef Node) {
246244 return Graph::child_end(Node);
247245 }
248246 };