llvm.org GIT mirror llvm / e6bc7d1
Use make_range to reduce mentions of iterator type. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254872 91177308-0d34-0410-b5e6-96231b3b80d8 Craig Topper 4 years ago
25 changed file(s) with 105 addition(s) and 139 deletion(s). Raw diff Collapse all Expand all
234234 parent_iterator parent_end() const { return ParentSCCs.end(); }
235235
236236 iterator_range parents() const {
237 return iterator_range(parent_begin(), parent_end());
237 return make_range(parent_begin(), parent_end());
238238 }
239239
240240 /// \brief Test if this SCC is a parent of \a C.
409409 }
410410
411411 iterator_range postorder_sccs() {
412 return iterator_range(postorder_scc_begin(),
413 postorder_scc_end());
412 return make_range(postorder_scc_begin(), postorder_scc_end());
414413 }
415414
416415 /// \brief Lookup a function in the graph which has already been scanned and
140140 block_iterator block_begin() const { return Blocks.begin(); }
141141 block_iterator block_end() const { return Blocks.end(); }
142142 inline iterator_range blocks() const {
143 return iterator_range(block_begin(), block_end());
143 return make_range(block_begin(), block_end());
144144 }
145145
146146 /// getNumBlocks - Get the number of blocks in this loop in constant time.
271271 }
272272
273273 inline iterator_range terminators() {
274 return iterator_range(getFirstTerminator(), end());
274 return make_range(getFirstTerminator(), end());
275275 }
276276 inline iterator_range terminators() const {
277 return iterator_range(getFirstTerminator(), end());
277 return make_range(getFirstTerminator(), end());
278278 }
279279
280280 // Machine-CFG iterators
324324 bool succ_empty() const { return Successors.empty(); }
325325
326326 inline iterator_range predecessors() {
327 return iterator_range(pred_begin(), pred_end());
327 return make_range(pred_begin(), pred_end());
328328 }
329329 inline iterator_range predecessors() const {
330 return iterator_range(pred_begin(), pred_end());
330 return make_range(pred_begin(), pred_end());
331331 }
332332 inline iterator_range successors() {
333 return iterator_range(succ_begin(), succ_end());
333 return make_range(succ_begin(), succ_end());
334334 }
335335 inline iterator_range successors() const {
336 return iterator_range(succ_begin(), succ_end());
336 return make_range(succ_begin(), succ_end());
337337 }
338338
339339 // LiveIn management methods.
295295 const_mop_iterator operands_end() const { return Operands + NumOperands; }
296296
297297 iterator_range operands() {
298 return iterator_range(operands_begin(), operands_end());
298 return make_range(operands_begin(), operands_end());
299299 }
300300 iterator_range operands() const {
301 return iterator_range(operands_begin(), operands_end());
301 return make_range(operands_begin(), operands_end());
302302 }
303303 iterator_range explicit_operands() {
304 return iterator_range(
305 operands_begin(), operands_begin() + getNumExplicitOperands());
304 return make_range(operands_begin(),
305 operands_begin() + getNumExplicitOperands());
306306 }
307307 iterator_range explicit_operands() const {
308 return iterator_range(
309 operands_begin(), operands_begin() + getNumExplicitOperands());
308 return make_range(operands_begin(),
309 operands_begin() + getNumExplicitOperands());
310310 }
311311 iterator_range implicit_operands() {
312 return iterator_range(explicit_operands().end(),
313 operands_end());
312 return make_range(explicit_operands().end(), operands_end());
314313 }
315314 iterator_range implicit_operands() const {
316 return iterator_range(explicit_operands().end(),
317 operands_end());
315 return make_range(explicit_operands().end(), operands_end());
318316 }
319317 /// Returns a range over all explicit operands that are register definitions.
320318 /// Implicit definition are not included!
321319 iterator_range defs() {
322 return iterator_range(
323 operands_begin(), operands_begin() + getDesc().getNumDefs());
320 return make_range(operands_begin(),
321 operands_begin() + getDesc().getNumDefs());
324322 }
325323 /// \copydoc defs()
326324 iterator_range defs() const {
327 return iterator_range(
328 operands_begin(), operands_begin() + getDesc().getNumDefs());
325 return make_range(operands_begin(),
326 operands_begin() + getDesc().getNumDefs());
329327 }
330328 /// Returns a range that includes all operands that are register uses.
331329 /// This may include unrelated operands which are not register uses.
332330 iterator_range uses() {
333 return iterator_range(
334 operands_begin() + getDesc().getNumDefs(), operands_end());
331 return make_range(operands_begin() + getDesc().getNumDefs(),
332 operands_end());
335333 }
336334 /// \copydoc uses()
337335 iterator_range uses() const {
338 return iterator_range(
339 operands_begin() + getDesc().getNumDefs(), operands_end());
336 return make_range(operands_begin() + getDesc().getNumDefs(),
337 operands_end());
340338 }
341339
342340 /// Returns the number of the operand iterator \p I points to.
350348 bool memoperands_empty() const { return NumMemRefs == 0; }
351349
352350 iterator_range memoperands() {
353 return iterator_range(memoperands_begin(), memoperands_end());
351 return make_range(memoperands_begin(), memoperands_end());
354352 }
355353 iterator_range memoperands() const {
356 return iterator_range(memoperands_begin(), memoperands_end());
354 return make_range(memoperands_begin(), memoperands_end());
357355 }
358356
359357 /// Return true if this instruction has exactly one MachineMemOperand.
233233 static reg_iterator reg_end() { return reg_iterator(nullptr); }
234234
235235 inline iterator_range reg_operands(unsigned Reg) const {
236 return iterator_range(reg_begin(Reg), reg_end());
236 return make_range(reg_begin(Reg), reg_end());
237237 }
238238
239239 /// reg_instr_iterator/reg_instr_begin/reg_instr_end - Walk all defs and uses
249249
250250 inline iterator_range
251251 reg_instructions(unsigned Reg) const {
252 return iterator_range(reg_instr_begin(Reg),
253 reg_instr_end());
252 return make_range(reg_instr_begin(Reg), reg_instr_end());
254253 }
255254
256255 /// reg_bundle_iterator/reg_bundle_begin/reg_bundle_end - Walk all defs and uses
265264 }
266265
267266 inline iterator_range reg_bundles(unsigned Reg) const {
268 return iterator_range(reg_bundle_begin(Reg),
269 reg_bundle_end());
267 return make_range(reg_bundle_begin(Reg), reg_bundle_end());
270268 }
271269
272270 /// reg_empty - Return true if there are no instructions using or defining the
286284
287285 inline iterator_range
288286 reg_nodbg_operands(unsigned Reg) const {
289 return iterator_range(reg_nodbg_begin(Reg),
290 reg_nodbg_end());
287 return make_range(reg_nodbg_begin(Reg), reg_nodbg_end());
291288 }
292289
293290 /// reg_instr_nodbg_iterator/reg_instr_nodbg_begin/reg_instr_nodbg_end - Walk
304301
305302 inline iterator_range
306303 reg_nodbg_instructions(unsigned Reg) const {
307 return iterator_range(reg_instr_nodbg_begin(Reg),
308 reg_instr_nodbg_end());
304 return make_range(reg_instr_nodbg_begin(Reg), reg_instr_nodbg_end());
309305 }
310306
311307 /// reg_bundle_nodbg_iterator/reg_bundle_nodbg_begin/reg_bundle_nodbg_end - Walk
322318
323319 inline iterator_range
324320 reg_nodbg_bundles(unsigned Reg) const {
325 return iterator_range(reg_bundle_nodbg_begin(Reg),
326 reg_bundle_nodbg_end());
321 return make_range(reg_bundle_nodbg_begin(Reg), reg_bundle_nodbg_end());
327322 }
328323
329324 /// reg_nodbg_empty - Return true if the only instructions using or defining
341336 static def_iterator def_end() { return def_iterator(nullptr); }
342337
343338 inline iterator_range def_operands(unsigned Reg) const {
344 return iterator_range(def_begin(Reg), def_end());
339 return make_range(def_begin(Reg), def_end());
345340 }
346341
347342 /// def_instr_iterator/def_instr_begin/def_instr_end - Walk all defs of the
357352
358353 inline iterator_range
359354 def_instructions(unsigned Reg) const {
360 return iterator_range(def_instr_begin(Reg),
361 def_instr_end());
355 return make_range(def_instr_begin(Reg), def_instr_end());
362356 }
363357
364358 /// def_bundle_iterator/def_bundle_begin/def_bundle_end - Walk all defs of the
373367 }
374368
375369 inline iterator_range def_bundles(unsigned Reg) const {
376 return iterator_range(def_bundle_begin(Reg),
377 def_bundle_end());
370 return make_range(def_bundle_begin(Reg), def_bundle_end());
378371 }
379372
380373 /// def_empty - Return true if there are no instructions defining the
399392 static use_iterator use_end() { return use_iterator(nullptr); }
400393
401394 inline iterator_range use_operands(unsigned Reg) const {
402 return iterator_range(use_begin(Reg), use_end());
395 return make_range(use_begin(Reg), use_end());
403396 }
404397
405398 /// use_instr_iterator/use_instr_begin/use_instr_end - Walk all uses of the
415408
416409 inline iterator_range
417410 use_instructions(unsigned Reg) const {
418 return iterator_range(use_instr_begin(Reg),
419 use_instr_end());
411 return make_range(use_instr_begin(Reg), use_instr_end());
420412 }
421413
422414 /// use_bundle_iterator/use_bundle_begin/use_bundle_end - Walk all uses of the
431423 }
432424
433425 inline iterator_range use_bundles(unsigned Reg) const {
434 return iterator_range(use_bundle_begin(Reg),
435 use_bundle_end());
426 return make_range(use_bundle_begin(Reg), use_bundle_end());
436427 }
437428
438429 /// use_empty - Return true if there are no instructions using the specified
461452
462453 inline iterator_range
463454 use_nodbg_operands(unsigned Reg) const {
464 return iterator_range(use_nodbg_begin(Reg),
465 use_nodbg_end());
455 return make_range(use_nodbg_begin(Reg), use_nodbg_end());
466456 }
467457
468458 /// use_instr_nodbg_iterator/use_instr_nodbg_begin/use_instr_nodbg_end - Walk
479469
480470 inline iterator_range
481471 use_nodbg_instructions(unsigned Reg) const {
482 return iterator_range(use_instr_nodbg_begin(Reg),
483 use_instr_nodbg_end());
472 return make_range(use_instr_nodbg_begin(Reg), use_instr_nodbg_end());
484473 }
485474
486475 /// use_bundle_nodbg_iterator/use_bundle_nodbg_begin/use_bundle_nodbg_end - Walk
497486
498487 inline iterator_range
499488 use_nodbg_bundles(unsigned Reg) const {
500 return iterator_range(use_bundle_nodbg_begin(Reg),
501 use_bundle_nodbg_end());
489 return make_range(use_bundle_nodbg_begin(Reg), use_bundle_nodbg_end());
502490 }
503491
504492 /// use_nodbg_empty - Return true if there are no non-Debug instructions
325325 }
326326
327327 iterator_range allnodes() {
328 return iterator_range(allnodes_begin(), allnodes_end());
328 return make_range(allnodes_begin(), allnodes_end());
329329 }
330330 iterator_range allnodes() const {
331 return iterator_range(allnodes_begin(),
332 allnodes_end());
331 return make_range(allnodes_begin(), allnodes_end());
333332 }
334333
335334 /// Return the root tag of the SelectionDAG.
575575 static use_iterator use_end() { return use_iterator(nullptr); }
576576
577577 inline iterator_range uses() {
578 return iterator_range(use_begin(), use_end());
578 return make_range(use_begin(), use_end());
579579 }
580580 inline iterator_range uses() const {
581 return iterator_range(use_begin(), use_end());
581 return make_range(use_begin(), use_end());
582582 }
583583
584584 /// Return true if there are exactly NUSES uses of the indicated value.
650650 };
651651
652652 iterator_range op_values() const {
653 return iterator_range(value_op_iterator(op_begin()),
654 value_op_iterator(op_end()));
653 return make_range(value_op_iterator(op_begin()),
654 value_op_iterator(op_end()));
655655 }
656656
657657 SDVTList getVTList() const {
157157
158158 IterTy arg_end() const { return (*this)->op_end() - getArgumentEndOffset(); }
159159 iterator_range args() const {
160 return iterator_range(arg_begin(), arg_end());
160 return make_range(arg_begin(), arg_end());
161161 }
162162 bool arg_empty() const { return arg_end() == arg_begin(); }
163163 unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); }
181181 return (*this)->op_end() - (isCall() ? 1 : 3);
182182 }
183183 iterator_range data_ops() const {
184 return iterator_range(data_operands_begin(), data_operands_end());
184 return make_range(data_operands_begin(), data_operands_end());
185185 }
186186 bool data_operands_empty() const {
187187 return data_operands_end() == data_operands_begin();
104104 typedef SmallVectorImpl::const_iterator scope_iterator;
105105
106106 iterator_range compile_units() const {
107 return iterator_range(CUs.begin(), CUs.end());
107 return make_range(CUs.begin(), CUs.end());
108108 }
109109
110110 iterator_range subprograms() const {
111 return iterator_range(SPs.begin(), SPs.end());
111 return make_range(SPs.begin(), SPs.end());
112112 }
113113
114114 iterator_range global_variables() const {
115 return iterator_range(GVs.begin(), GVs.end());
115 return make_range(GVs.begin(), GVs.end());
116116 }
117117
118118 iterator_range types() const {
119 return iterator_range(TYs.begin(), TYs.end());
119 return make_range(TYs.begin(), TYs.end());
120120 }
121121
122122 iterator_range scopes() const {
123 return iterator_range(Scopes.begin(), Scopes.end());
123 return make_range(Scopes.begin(), Scopes.end());
124124 }
125125
126126 unsigned compile_unit_count() const { return CUs.size(); }
492492 }
493493
494494 iterator_range args() {
495 return iterator_range(arg_begin(), arg_end());
495 return make_range(arg_begin(), arg_end());
496496 }
497497
498498 iterator_range args() const {
499 return iterator_range(arg_begin(), arg_end());
499 return make_range(arg_begin(), arg_end());
500500 }
501501
502502 /// @}
14781478
14791479 /// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).
14801480 iterator_range bundle_op_infos() {
1481 return iterator_range(bundle_op_info_begin(),
1482 bundle_op_info_end());
1481 return make_range(bundle_op_info_begin(), bundle_op_info_end());
14831482 }
14841483
14851484 /// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).
14861485 iterator_range bundle_op_infos() const {
1487 return iterator_range(bundle_op_info_begin(),
1488 bundle_op_info_end());
1486 return make_range(bundle_op_info_begin(), bundle_op_info_end());
14891487 }
14901488
14911489 /// \brief Populate the BundleOpInfo instances and the Use& vector from \p
15461546 iterator_range arg_operands() {
15471547 // The last operand in the op list is the callee - it's not one of the args
15481548 // so we don't want to iterate over it.
1549 return iterator_range(
1550 op_begin(), op_end() - getNumTotalBundleOperands() - 1);
1549 return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 1);
15511550 }
15521551
15531552 /// arg_operands - iteration adapter for range-for loops.
15541553 iterator_range arg_operands() const {
1555 return iterator_range(
1556 op_begin(), op_end() - getNumTotalBundleOperands() - 1);
1554 return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 1);
15571555 }
15581556
15591557 /// \brief Wrappers for getting the \c Use of a call argument.
22122210 inline idx_iterator idx_begin() const { return Indices.begin(); }
22132211 inline idx_iterator idx_end() const { return Indices.end(); }
22142212 inline iterator_range indices() const {
2215 return iterator_range(idx_begin(), idx_end());
2213 return make_range(idx_begin(), idx_end());
22162214 }
22172215
22182216 Value *getAggregateOperand() {
23292327 inline idx_iterator idx_begin() const { return Indices.begin(); }
23302328 inline idx_iterator idx_end() const { return Indices.end(); }
23312329 inline iterator_range indices() const {
2332 return iterator_range(idx_begin(), idx_end());
2330 return make_range(idx_begin(), idx_end());
23332331 }
23342332
23352333 Value *getAggregateOperand() {
31043102
31053103 /// cases - iteration adapter for range-for loops.
31063104 iterator_range cases() {
3107 return iterator_range(case_begin(), case_end());
3105 return make_range(case_begin(), case_end());
31083106 }
31093107
31103108 /// cases - iteration adapter for range-for loops.
31113109 iterator_range cases() const {
3112 return iterator_range(case_begin(), case_end());
3110 return make_range(case_begin(), case_end());
31133111 }
31143112
31153113 /// Returns an iterator that points to the default case.
34533451
34543452 /// arg_operands - iteration adapter for range-for loops.
34553453 iterator_range arg_operands() {
3456 return iterator_range(
3457 op_begin(), op_end() - getNumTotalBundleOperands() - 3);
3454 return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 3);
34583455 }
34593456
34603457 /// arg_operands - iteration adapter for range-for loops.
34613458 iterator_range arg_operands() const {
3462 return iterator_range(
3463 op_begin(), op_end() - getNumTotalBundleOperands() - 3);
3459 return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 3);
34643460 }
34653461
34663462 /// \brief Wrappers for getting the \c Use of a invoke argument.
39143910
39153911 /// arg_operands - iteration adapter for range-for loops.
39163912 iterator_range arg_operands() {
3917 return iterator_range(op_begin(), op_end() - 2);
3913 return make_range(op_begin(), op_end() - 2);
39183914 }
39193915
39203916 /// arg_operands - iteration adapter for range-for loops.
39213917 iterator_range arg_operands() const {
3922 return iterator_range(op_begin(), op_end() - 2);
3918 return make_range(op_begin(), op_end() - 2);
39233919 }
39243920
39253921 /// \brief Wrappers for getting the \c Use of a catchpad argument.
40384034
40394035 /// arg_operands - iteration adapter for range-for loops.
40404036 iterator_range arg_operands() {
4041 return iterator_range(op_begin(), arg_end());
4037 return make_range(op_begin(), arg_end());
40424038 }
40434039
40444040 /// arg_operands - iteration adapter for range-for loops.
40454041 iterator_range arg_operands() const {
4046 return iterator_range(op_begin(), arg_end());
4042 return make_range(op_begin(), arg_end());
40474043 }
40484044
40494045 /// \brief Wrappers for getting the \c Use of a terminatepad argument.
12091209 const_op_iterator op_end() const { return const_op_iterator(this, getNumOperands()); }
12101210
12111211 inline iterator_range operands() {
1212 return iterator_range(op_begin(), op_end());
1212 return make_range(op_begin(), op_end());
12131213 }
12141214 inline iterator_range operands() const {
1215 return iterator_range(op_begin(), op_end());
1215 return make_range(op_begin(), op_end());
12161216 }
12171217 };
12181218
514514 bool global_empty() const { return GlobalList.empty(); }
515515
516516 iterator_range globals() {
517 return iterator_range(global_begin(), global_end());
517 return make_range(global_begin(), global_end());
518518 }
519519 iterator_range globals() const {
520 return iterator_range(global_begin(), global_end());
520 return make_range(global_begin(), global_end());
521521 }
522522
523523 /// @}
536536 bool empty() const { return FunctionList.empty(); }
537537
538538 iterator_range functions() {
539 return iterator_range(begin(), end());
539 return make_range(begin(), end());
540540 }
541541 iterator_range functions() const {
542 return iterator_range(begin(), end());
542 return make_range(begin(), end());
543543 }
544544
545545 /// @}
554554 bool alias_empty() const { return AliasList.empty(); }
555555
556556 iterator_range aliases() {
557 return iterator_range(alias_begin(), alias_end());
557 return make_range(alias_begin(), alias_end());
558558 }
559559 iterator_range aliases() const {
560 return iterator_range(alias_begin(), alias_end());
560 return make_range(alias_begin(), alias_end());
561561 }
562562
563563 /// @}
578578 bool named_metadata_empty() const { return NamedMDList.empty(); }
579579
580580 iterator_range named_metadata() {
581 return iterator_range(named_metadata_begin(),
582 named_metadata_end());
581 return make_range(named_metadata_begin(), named_metadata_end());
583582 }
584583 iterator_range named_metadata() const {
585 return iterator_range(named_metadata_begin(),
586 named_metadata_end());
584 return make_range(named_metadata_begin(), named_metadata_end());
587585 }
588586
589587 /// Destroy ConstantArrays in LLVMContext if they are not used.
172172
173173 /// range adapter for call arguments
174174 iterator_range call_args() const {
175 return iterator_range(arg_begin(), arg_end());
175 return make_range(arg_begin(), arg_end());
176176 }
177177
178178 /// \brief Return true if the call or the callee has the given attribute.
200200
201201 /// range adapter for GC transition arguments
202202 iterator_range gc_transition_args() const {
203 return iterator_range(gc_transition_args_begin(),
204 gc_transition_args_end());
203 return make_range(gc_transition_args_begin(), gc_transition_args_end());
205204 }
206205
207206 /// Number of additional arguments excluding those intended
224223
225224 /// range adapter for vm state arguments
226225 iterator_range vm_state_args() const {
227 return iterator_range(vm_state_begin(), vm_state_end());
226 return make_range(vm_state_begin(), vm_state_end());
228227 }
229228
230229 typename CallSiteTy::arg_iterator gc_args_begin() const {
240239
241240 /// range adapter for gc arguments
242241 iterator_range gc_args() const {
243 return iterator_range(gc_args_begin(), gc_args_end());
242 return make_range(gc_args_begin(), gc_args_end());
244243 }
245244
246245 /// Get list of all gc reloactes linked to this statepoint
232232 return value_op_iterator(op_end());
233233 }
234234 iterator_range operand_values() {
235 return iterator_range(value_op_begin(), value_op_end());
235 return make_range(value_op_begin(), value_op_end());
236236 }
237237
238238 /// \brief Drop all references to operands.
282282 use_iterator use_end() { return use_iterator(); }
283283 const_use_iterator use_end() const { return const_use_iterator(); }
284284 iterator_range uses() {
285 return iterator_range(use_begin(), use_end());
285 return make_range(use_begin(), use_end());
286286 }
287287 iterator_range uses() const {
288 return iterator_range(use_begin(), use_end());
288 return make_range(use_begin(), use_end());
289289 }
290290
291291 bool user_empty() const { return UseList == nullptr; }
299299 User *user_back() { return *user_begin(); }
300300 const User *user_back() const { return *user_begin(); }
301301 iterator_range users() {
302 return iterator_range(user_begin(), user_end());
302 return make_range(user_begin(), user_end());
303303 }
304304 iterator_range users() const {
305 return iterator_range(user_begin(), user_end());
305 return make_range(user_begin(), user_end());
306306 }
307307
308308 /// \brief Return true if there is exactly one user of this value.
190190 child_iterator child_begin(bool SkipInternal = true) const;
191191 child_iterator child_end() const;
192192 iterator_range children(bool SkipInternal = true) const {
193 return iterator_range(child_begin(SkipInternal),
194 child_end());
193 return make_range(child_begin(SkipInternal), child_end());
195194 }
196195
197196 symbol_iterator symbol_begin() const;
198197 symbol_iterator symbol_end() const;
199198 iterator_range symbols() const {
200 return iterator_range(symbol_begin(), symbol_end());
199 return make_range(symbol_begin(), symbol_end());
201200 }
202201
203202 // Cast methods.
9999 relocation_iterator relocation_begin() const;
100100 relocation_iterator relocation_end() const;
101101 iterator_range relocations() const {
102 return iterator_range(relocation_begin(),
103 relocation_end());
102 return make_range(relocation_begin(), relocation_end());
104103 }
105104 section_iterator getRelocatedSection() const;
106105
118118 static iterator end() { return iterator(nullptr); }
119119
120120 static iterator_range entries() {
121 return iterator_range(begin(), end());
121 return make_range(begin(), end());
122122 }
123123
124124 /// Abstract base class for registry listeners, which are informed when new
8585 ModulePtrSet::iterator begin_added() { return AddedModules.begin(); }
8686 ModulePtrSet::iterator end_added() { return AddedModules.end(); }
8787 iterator_range added() {
88 return iterator_range(begin_added(), end_added());
88 return make_range(begin_added(), end_added());
8989 }
9090
9191 ModulePtrSet::iterator begin_loaded() { return LoadedModules.begin(); }
14021402 ExportEntry Finish(Trie);
14031403 Finish.moveToEnd();
14041404
1405 return iterator_range(export_iterator(Start),
1406 export_iterator(Finish));
1405 return make_range(export_iterator(Start), export_iterator(Finish));
14071406 }
14081407
14091408 iterator_range MachOObjectFile::exports() const {
15731572 MachORebaseEntry Finish(Opcodes, is64);
15741573 Finish.moveToEnd();
15751574
1576 return iterator_range(rebase_iterator(Start),
1577 rebase_iterator(Finish));
1575 return make_range(rebase_iterator(Start), rebase_iterator(Finish));
15781576 }
15791577
15801578 iterator_range MachOObjectFile::rebaseTable() const {
18251823 MachOBindEntry Finish(Opcodes, is64, BKind);
18261824 Finish.moveToEnd();
18271825
1828 return iterator_range(bind_iterator(Start),
1829 bind_iterator(Finish));
1826 return make_range(bind_iterator(Start), bind_iterator(Finish));
18301827 }
18311828
18321829 iterator_range MachOObjectFile::bindTable() const {
18561853
18571854 iterator_range
18581855 MachOObjectFile::load_commands() const {
1859 return iterator_range(begin_load_commands(),
1860 end_load_commands());
1856 return make_range(begin_load_commands(), end_load_commands());
18611857 }
18621858
18631859 StringRef
4444 iterator_range
4545 HexagonMCInstrInfo::bundleInstructions(MCInst const &MCI) {
4646 assert(isBundle(MCI));
47 return iterator_range(
48 MCI.begin() + bundleInstructionsOffset, MCI.end());
47 return make_range(MCI.begin() + bundleInstructionsOffset, MCI.end());
4948 }
5049
5150 size_t HexagonMCInstrInfo::bundleSize(MCInst const &MCI) {
256256 class_iterator classes_end() { return SchedClasses.end(); }
257257 const_class_iterator classes_end() const { return SchedClasses.end(); }
258258 iterator_range classes() {
259 return iterator_range(classes_begin(), classes_end());
259 return make_range(classes_begin(), classes_end());
260260 }
261261 iterator_range classes() const {
262 return iterator_range(classes_begin(), classes_end());
262 return make_range(classes_begin(), classes_end());
263263 }
264264 iterator_range explicit_classes() {
265 return iterator_range(
266 classes_begin(), classes_begin() + NumInstrSchedClasses);
265 return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses);
267266 }
268267 iterator_range explicit_classes() const {
269 return iterator_range(
270 classes_begin(), classes_begin() + NumInstrSchedClasses);
268 return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses);
271269 }
272270
273271 Record *getModelOrItinDef(Record *ProcDef) const {
172172 inst_iterator inst_begin() const{return getInstructionsByEnumValue().begin();}
173173 inst_iterator inst_end() const { return getInstructionsByEnumValue().end(); }
174174 iterator_range instructions() const {
175 return iterator_range(inst_begin(), inst_end());
175 return make_range(inst_begin(), inst_end());
176176 }
177177
178178