parent_iterator parent_end() const { return ParentSCCs.end(); }
iterator_range<parent_iterator> parents() const {
- return iterator_range<parent_iterator>(parent_begin(), parent_end());
+ return make_range(parent_begin(), parent_end());
}
/// \brief Test if this SCC is a parent of \a C.
}
iterator_range<postorder_scc_iterator> postorder_sccs() {
- return iterator_range<postorder_scc_iterator>(postorder_scc_begin(),
- postorder_scc_end());
+ return make_range(postorder_scc_begin(), postorder_scc_end());
}
/// \brief Lookup a function in the graph which has already been scanned and
block_iterator block_begin() const { return Blocks.begin(); }
block_iterator block_end() const { return Blocks.end(); }
inline iterator_range<block_iterator> blocks() const {
- return iterator_range<block_iterator>(block_begin(), block_end());
+ return make_range(block_begin(), block_end());
}
/// getNumBlocks - Get the number of blocks in this loop in constant time.
}
inline iterator_range<iterator> terminators() {
- return iterator_range<iterator>(getFirstTerminator(), end());
+ return make_range(getFirstTerminator(), end());
}
inline iterator_range<const_iterator> terminators() const {
- return iterator_range<const_iterator>(getFirstTerminator(), end());
+ return make_range(getFirstTerminator(), end());
}
// Machine-CFG iterators
bool succ_empty() const { return Successors.empty(); }
inline iterator_range<pred_iterator> predecessors() {
- return iterator_range<pred_iterator>(pred_begin(), pred_end());
+ return make_range(pred_begin(), pred_end());
}
inline iterator_range<const_pred_iterator> predecessors() const {
- return iterator_range<const_pred_iterator>(pred_begin(), pred_end());
+ return make_range(pred_begin(), pred_end());
}
inline iterator_range<succ_iterator> successors() {
- return iterator_range<succ_iterator>(succ_begin(), succ_end());
+ return make_range(succ_begin(), succ_end());
}
inline iterator_range<const_succ_iterator> successors() const {
- return iterator_range<const_succ_iterator>(succ_begin(), succ_end());
+ return make_range(succ_begin(), succ_end());
}
// LiveIn management methods.
const_mop_iterator operands_end() const { return Operands + NumOperands; }
iterator_range<mop_iterator> operands() {
- return iterator_range<mop_iterator>(operands_begin(), operands_end());
+ return make_range(operands_begin(), operands_end());
}
iterator_range<const_mop_iterator> operands() const {
- return iterator_range<const_mop_iterator>(operands_begin(), operands_end());
+ return make_range(operands_begin(), operands_end());
}
iterator_range<mop_iterator> explicit_operands() {
- return iterator_range<mop_iterator>(
- operands_begin(), operands_begin() + getNumExplicitOperands());
+ return make_range(operands_begin(),
+ operands_begin() + getNumExplicitOperands());
}
iterator_range<const_mop_iterator> explicit_operands() const {
- return iterator_range<const_mop_iterator>(
- operands_begin(), operands_begin() + getNumExplicitOperands());
+ return make_range(operands_begin(),
+ operands_begin() + getNumExplicitOperands());
}
iterator_range<mop_iterator> implicit_operands() {
- return iterator_range<mop_iterator>(explicit_operands().end(),
- operands_end());
+ return make_range(explicit_operands().end(), operands_end());
}
iterator_range<const_mop_iterator> implicit_operands() const {
- return iterator_range<const_mop_iterator>(explicit_operands().end(),
- operands_end());
+ return make_range(explicit_operands().end(), operands_end());
}
/// Returns a range over all explicit operands that are register definitions.
/// Implicit definition are not included!
iterator_range<mop_iterator> defs() {
- return iterator_range<mop_iterator>(
- operands_begin(), operands_begin() + getDesc().getNumDefs());
+ return make_range(operands_begin(),
+ operands_begin() + getDesc().getNumDefs());
}
/// \copydoc defs()
iterator_range<const_mop_iterator> defs() const {
- return iterator_range<const_mop_iterator>(
- operands_begin(), operands_begin() + getDesc().getNumDefs());
+ return make_range(operands_begin(),
+ operands_begin() + getDesc().getNumDefs());
}
/// Returns a range that includes all operands that are register uses.
/// This may include unrelated operands which are not register uses.
iterator_range<mop_iterator> uses() {
- return iterator_range<mop_iterator>(
- operands_begin() + getDesc().getNumDefs(), operands_end());
+ return make_range(operands_begin() + getDesc().getNumDefs(),
+ operands_end());
}
/// \copydoc uses()
iterator_range<const_mop_iterator> uses() const {
- return iterator_range<const_mop_iterator>(
- operands_begin() + getDesc().getNumDefs(), operands_end());
+ return make_range(operands_begin() + getDesc().getNumDefs(),
+ operands_end());
}
/// Returns the number of the operand iterator \p I points to.
bool memoperands_empty() const { return NumMemRefs == 0; }
iterator_range<mmo_iterator> memoperands() {
- return iterator_range<mmo_iterator>(memoperands_begin(), memoperands_end());
+ return make_range(memoperands_begin(), memoperands_end());
}
iterator_range<mmo_iterator> memoperands() const {
- return iterator_range<mmo_iterator>(memoperands_begin(), memoperands_end());
+ return make_range(memoperands_begin(), memoperands_end());
}
/// Return true if this instruction has exactly one MachineMemOperand.
static reg_iterator reg_end() { return reg_iterator(nullptr); }
inline iterator_range<reg_iterator> reg_operands(unsigned Reg) const {
- return iterator_range<reg_iterator>(reg_begin(Reg), reg_end());
+ return make_range(reg_begin(Reg), reg_end());
}
/// reg_instr_iterator/reg_instr_begin/reg_instr_end - Walk all defs and uses
inline iterator_range<reg_instr_iterator>
reg_instructions(unsigned Reg) const {
- return iterator_range<reg_instr_iterator>(reg_instr_begin(Reg),
- reg_instr_end());
+ return make_range(reg_instr_begin(Reg), reg_instr_end());
}
/// reg_bundle_iterator/reg_bundle_begin/reg_bundle_end - Walk all defs and uses
}
inline iterator_range<reg_bundle_iterator> reg_bundles(unsigned Reg) const {
- return iterator_range<reg_bundle_iterator>(reg_bundle_begin(Reg),
- reg_bundle_end());
+ return make_range(reg_bundle_begin(Reg), reg_bundle_end());
}
/// reg_empty - Return true if there are no instructions using or defining the
inline iterator_range<reg_nodbg_iterator>
reg_nodbg_operands(unsigned Reg) const {
- return iterator_range<reg_nodbg_iterator>(reg_nodbg_begin(Reg),
- reg_nodbg_end());
+ return make_range(reg_nodbg_begin(Reg), reg_nodbg_end());
}
/// reg_instr_nodbg_iterator/reg_instr_nodbg_begin/reg_instr_nodbg_end - Walk
inline iterator_range<reg_instr_nodbg_iterator>
reg_nodbg_instructions(unsigned Reg) const {
- return iterator_range<reg_instr_nodbg_iterator>(reg_instr_nodbg_begin(Reg),
- reg_instr_nodbg_end());
+ return make_range(reg_instr_nodbg_begin(Reg), reg_instr_nodbg_end());
}
/// reg_bundle_nodbg_iterator/reg_bundle_nodbg_begin/reg_bundle_nodbg_end - Walk
inline iterator_range<reg_bundle_nodbg_iterator>
reg_nodbg_bundles(unsigned Reg) const {
- return iterator_range<reg_bundle_nodbg_iterator>(reg_bundle_nodbg_begin(Reg),
- reg_bundle_nodbg_end());
+ return make_range(reg_bundle_nodbg_begin(Reg), reg_bundle_nodbg_end());
}
/// reg_nodbg_empty - Return true if the only instructions using or defining
static def_iterator def_end() { return def_iterator(nullptr); }
inline iterator_range<def_iterator> def_operands(unsigned Reg) const {
- return iterator_range<def_iterator>(def_begin(Reg), def_end());
+ return make_range(def_begin(Reg), def_end());
}
/// def_instr_iterator/def_instr_begin/def_instr_end - Walk all defs of the
inline iterator_range<def_instr_iterator>
def_instructions(unsigned Reg) const {
- return iterator_range<def_instr_iterator>(def_instr_begin(Reg),
- def_instr_end());
+ return make_range(def_instr_begin(Reg), def_instr_end());
}
/// def_bundle_iterator/def_bundle_begin/def_bundle_end - Walk all defs of the
}
inline iterator_range<def_bundle_iterator> def_bundles(unsigned Reg) const {
- return iterator_range<def_bundle_iterator>(def_bundle_begin(Reg),
- def_bundle_end());
+ return make_range(def_bundle_begin(Reg), def_bundle_end());
}
/// def_empty - Return true if there are no instructions defining the
static use_iterator use_end() { return use_iterator(nullptr); }
inline iterator_range<use_iterator> use_operands(unsigned Reg) const {
- return iterator_range<use_iterator>(use_begin(Reg), use_end());
+ return make_range(use_begin(Reg), use_end());
}
/// use_instr_iterator/use_instr_begin/use_instr_end - Walk all uses of the
inline iterator_range<use_instr_iterator>
use_instructions(unsigned Reg) const {
- return iterator_range<use_instr_iterator>(use_instr_begin(Reg),
- use_instr_end());
+ return make_range(use_instr_begin(Reg), use_instr_end());
}
/// use_bundle_iterator/use_bundle_begin/use_bundle_end - Walk all uses of the
}
inline iterator_range<use_bundle_iterator> use_bundles(unsigned Reg) const {
- return iterator_range<use_bundle_iterator>(use_bundle_begin(Reg),
- use_bundle_end());
+ return make_range(use_bundle_begin(Reg), use_bundle_end());
}
/// use_empty - Return true if there are no instructions using the specified
inline iterator_range<use_nodbg_iterator>
use_nodbg_operands(unsigned Reg) const {
- return iterator_range<use_nodbg_iterator>(use_nodbg_begin(Reg),
- use_nodbg_end());
+ return make_range(use_nodbg_begin(Reg), use_nodbg_end());
}
/// use_instr_nodbg_iterator/use_instr_nodbg_begin/use_instr_nodbg_end - Walk
inline iterator_range<use_instr_nodbg_iterator>
use_nodbg_instructions(unsigned Reg) const {
- return iterator_range<use_instr_nodbg_iterator>(use_instr_nodbg_begin(Reg),
- use_instr_nodbg_end());
+ return make_range(use_instr_nodbg_begin(Reg), use_instr_nodbg_end());
}
/// use_bundle_nodbg_iterator/use_bundle_nodbg_begin/use_bundle_nodbg_end - Walk
inline iterator_range<use_bundle_nodbg_iterator>
use_nodbg_bundles(unsigned Reg) const {
- return iterator_range<use_bundle_nodbg_iterator>(use_bundle_nodbg_begin(Reg),
- use_bundle_nodbg_end());
+ return make_range(use_bundle_nodbg_begin(Reg), use_bundle_nodbg_end());
}
/// use_nodbg_empty - Return true if there are no non-Debug instructions
}
iterator_range<allnodes_iterator> allnodes() {
- return iterator_range<allnodes_iterator>(allnodes_begin(), allnodes_end());
+ return make_range(allnodes_begin(), allnodes_end());
}
iterator_range<allnodes_const_iterator> allnodes() const {
- return iterator_range<allnodes_const_iterator>(allnodes_begin(),
- allnodes_end());
+ return make_range(allnodes_begin(), allnodes_end());
}
/// Return the root tag of the SelectionDAG.
static use_iterator use_end() { return use_iterator(nullptr); }
inline iterator_range<use_iterator> uses() {
- return iterator_range<use_iterator>(use_begin(), use_end());
+ return make_range(use_begin(), use_end());
}
inline iterator_range<use_iterator> uses() const {
- return iterator_range<use_iterator>(use_begin(), use_end());
+ return make_range(use_begin(), use_end());
}
/// Return true if there are exactly NUSES uses of the indicated value.
};
iterator_range<value_op_iterator> op_values() const {
- return iterator_range<value_op_iterator>(value_op_iterator(op_begin()),
- value_op_iterator(op_end()));
+ return make_range(value_op_iterator(op_begin()),
+ value_op_iterator(op_end()));
}
SDVTList getVTList() const {
IterTy arg_end() const { return (*this)->op_end() - getArgumentEndOffset(); }
iterator_range<IterTy> args() const {
- return iterator_range<IterTy>(arg_begin(), arg_end());
+ return make_range(arg_begin(), arg_end());
}
bool arg_empty() const { return arg_end() == arg_begin(); }
unsigned arg_size() const { return unsigned(arg_end() - arg_begin()); }
return (*this)->op_end() - (isCall() ? 1 : 3);
}
iterator_range<IterTy> data_ops() const {
- return iterator_range<IterTy>(data_operands_begin(), data_operands_end());
+ return make_range(data_operands_begin(), data_operands_end());
}
bool data_operands_empty() const {
return data_operands_end() == data_operands_begin();
typedef SmallVectorImpl<DIScope *>::const_iterator scope_iterator;
iterator_range<compile_unit_iterator> compile_units() const {
- return iterator_range<compile_unit_iterator>(CUs.begin(), CUs.end());
+ return make_range(CUs.begin(), CUs.end());
}
iterator_range<subprogram_iterator> subprograms() const {
- return iterator_range<subprogram_iterator>(SPs.begin(), SPs.end());
+ return make_range(SPs.begin(), SPs.end());
}
iterator_range<global_variable_iterator> global_variables() const {
- return iterator_range<global_variable_iterator>(GVs.begin(), GVs.end());
+ return make_range(GVs.begin(), GVs.end());
}
iterator_range<type_iterator> types() const {
- return iterator_range<type_iterator>(TYs.begin(), TYs.end());
+ return make_range(TYs.begin(), TYs.end());
}
iterator_range<scope_iterator> scopes() const {
- return iterator_range<scope_iterator>(Scopes.begin(), Scopes.end());
+ return make_range(Scopes.begin(), Scopes.end());
}
unsigned compile_unit_count() const { return CUs.size(); }
}
iterator_range<arg_iterator> args() {
- return iterator_range<arg_iterator>(arg_begin(), arg_end());
+ return make_range(arg_begin(), arg_end());
}
iterator_range<const_arg_iterator> args() const {
- return iterator_range<const_arg_iterator>(arg_begin(), arg_end());
+ return make_range(arg_begin(), arg_end());
}
/// @}
/// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).
iterator_range<bundle_op_iterator> bundle_op_infos() {
- return iterator_range<bundle_op_iterator>(bundle_op_info_begin(),
- bundle_op_info_end());
+ return make_range(bundle_op_info_begin(), bundle_op_info_end());
}
/// \brief Return the range [\p bundle_op_info_begin, \p bundle_op_info_end).
iterator_range<const_bundle_op_iterator> bundle_op_infos() const {
- return iterator_range<const_bundle_op_iterator>(bundle_op_info_begin(),
- bundle_op_info_end());
+ return make_range(bundle_op_info_begin(), bundle_op_info_end());
}
/// \brief Populate the BundleOpInfo instances and the Use& vector from \p
iterator_range<op_iterator> arg_operands() {
// The last operand in the op list is the callee - it's not one of the args
// so we don't want to iterate over it.
- return iterator_range<op_iterator>(
- op_begin(), op_end() - getNumTotalBundleOperands() - 1);
+ return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 1);
}
/// arg_operands - iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
- return iterator_range<const_op_iterator>(
- op_begin(), op_end() - getNumTotalBundleOperands() - 1);
+ return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 1);
}
/// \brief Wrappers for getting the \c Use of a call argument.
inline idx_iterator idx_begin() const { return Indices.begin(); }
inline idx_iterator idx_end() const { return Indices.end(); }
inline iterator_range<idx_iterator> indices() const {
- return iterator_range<idx_iterator>(idx_begin(), idx_end());
+ return make_range(idx_begin(), idx_end());
}
Value *getAggregateOperand() {
inline idx_iterator idx_begin() const { return Indices.begin(); }
inline idx_iterator idx_end() const { return Indices.end(); }
inline iterator_range<idx_iterator> indices() const {
- return iterator_range<idx_iterator>(idx_begin(), idx_end());
+ return make_range(idx_begin(), idx_end());
}
Value *getAggregateOperand() {
/// cases - iteration adapter for range-for loops.
iterator_range<CaseIt> cases() {
- return iterator_range<CaseIt>(case_begin(), case_end());
+ return make_range(case_begin(), case_end());
}
/// cases - iteration adapter for range-for loops.
iterator_range<ConstCaseIt> cases() const {
- return iterator_range<ConstCaseIt>(case_begin(), case_end());
+ return make_range(case_begin(), case_end());
}
/// Returns an iterator that points to the default case.
/// arg_operands - iteration adapter for range-for loops.
iterator_range<op_iterator> arg_operands() {
- return iterator_range<op_iterator>(
- op_begin(), op_end() - getNumTotalBundleOperands() - 3);
+ return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 3);
}
/// arg_operands - iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
- return iterator_range<const_op_iterator>(
- op_begin(), op_end() - getNumTotalBundleOperands() - 3);
+ return make_range(op_begin(), op_end() - getNumTotalBundleOperands() - 3);
}
/// \brief Wrappers for getting the \c Use of a invoke argument.
/// arg_operands - iteration adapter for range-for loops.
iterator_range<op_iterator> arg_operands() {
- return iterator_range<op_iterator>(op_begin(), op_end() - 2);
+ return make_range(op_begin(), op_end() - 2);
}
/// arg_operands - iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
- return iterator_range<const_op_iterator>(op_begin(), op_end() - 2);
+ return make_range(op_begin(), op_end() - 2);
}
/// \brief Wrappers for getting the \c Use of a catchpad argument.
/// arg_operands - iteration adapter for range-for loops.
iterator_range<op_iterator> arg_operands() {
- return iterator_range<op_iterator>(op_begin(), arg_end());
+ return make_range(op_begin(), arg_end());
}
/// arg_operands - iteration adapter for range-for loops.
iterator_range<const_op_iterator> arg_operands() const {
- return iterator_range<const_op_iterator>(op_begin(), arg_end());
+ return make_range(op_begin(), arg_end());
}
/// \brief Wrappers for getting the \c Use of a terminatepad argument.
const_op_iterator op_end() const { return const_op_iterator(this, getNumOperands()); }
inline iterator_range<op_iterator> operands() {
- return iterator_range<op_iterator>(op_begin(), op_end());
+ return make_range(op_begin(), op_end());
}
inline iterator_range<const_op_iterator> operands() const {
- return iterator_range<const_op_iterator>(op_begin(), op_end());
+ return make_range(op_begin(), op_end());
}
};
bool global_empty() const { return GlobalList.empty(); }
iterator_range<global_iterator> globals() {
- return iterator_range<global_iterator>(global_begin(), global_end());
+ return make_range(global_begin(), global_end());
}
iterator_range<const_global_iterator> globals() const {
- return iterator_range<const_global_iterator>(global_begin(), global_end());
+ return make_range(global_begin(), global_end());
}
/// @}
bool empty() const { return FunctionList.empty(); }
iterator_range<iterator> functions() {
- return iterator_range<iterator>(begin(), end());
+ return make_range(begin(), end());
}
iterator_range<const_iterator> functions() const {
- return iterator_range<const_iterator>(begin(), end());
+ return make_range(begin(), end());
}
/// @}
bool alias_empty() const { return AliasList.empty(); }
iterator_range<alias_iterator> aliases() {
- return iterator_range<alias_iterator>(alias_begin(), alias_end());
+ return make_range(alias_begin(), alias_end());
}
iterator_range<const_alias_iterator> aliases() const {
- return iterator_range<const_alias_iterator>(alias_begin(), alias_end());
+ return make_range(alias_begin(), alias_end());
}
/// @}
bool named_metadata_empty() const { return NamedMDList.empty(); }
iterator_range<named_metadata_iterator> named_metadata() {
- return iterator_range<named_metadata_iterator>(named_metadata_begin(),
- named_metadata_end());
+ return make_range(named_metadata_begin(), named_metadata_end());
}
iterator_range<const_named_metadata_iterator> named_metadata() const {
- return iterator_range<const_named_metadata_iterator>(named_metadata_begin(),
- named_metadata_end());
+ return make_range(named_metadata_begin(), named_metadata_end());
}
/// Destroy ConstantArrays in LLVMContext if they are not used.
/// range adapter for call arguments
iterator_range<arg_iterator> call_args() const {
- return iterator_range<arg_iterator>(arg_begin(), arg_end());
+ return make_range(arg_begin(), arg_end());
}
/// \brief Return true if the call or the callee has the given attribute.
/// range adapter for GC transition arguments
iterator_range<arg_iterator> gc_transition_args() const {
- return iterator_range<arg_iterator>(gc_transition_args_begin(),
- gc_transition_args_end());
+ return make_range(gc_transition_args_begin(), gc_transition_args_end());
}
/// Number of additional arguments excluding those intended
/// range adapter for vm state arguments
iterator_range<arg_iterator> vm_state_args() const {
- return iterator_range<arg_iterator>(vm_state_begin(), vm_state_end());
+ return make_range(vm_state_begin(), vm_state_end());
}
typename CallSiteTy::arg_iterator gc_args_begin() const {
/// range adapter for gc arguments
iterator_range<arg_iterator> gc_args() const {
- return iterator_range<arg_iterator>(gc_args_begin(), gc_args_end());
+ return make_range(gc_args_begin(), gc_args_end());
}
/// Get list of all gc reloactes linked to this statepoint
return value_op_iterator(op_end());
}
iterator_range<value_op_iterator> operand_values() {
- return iterator_range<value_op_iterator>(value_op_begin(), value_op_end());
+ return make_range(value_op_begin(), value_op_end());
}
/// \brief Drop all references to operands.
use_iterator use_end() { return use_iterator(); }
const_use_iterator use_end() const { return const_use_iterator(); }
iterator_range<use_iterator> uses() {
- return iterator_range<use_iterator>(use_begin(), use_end());
+ return make_range(use_begin(), use_end());
}
iterator_range<const_use_iterator> uses() const {
- return iterator_range<const_use_iterator>(use_begin(), use_end());
+ return make_range(use_begin(), use_end());
}
bool user_empty() const { return UseList == nullptr; }
User *user_back() { return *user_begin(); }
const User *user_back() const { return *user_begin(); }
iterator_range<user_iterator> users() {
- return iterator_range<user_iterator>(user_begin(), user_end());
+ return make_range(user_begin(), user_end());
}
iterator_range<const_user_iterator> users() const {
- return iterator_range<const_user_iterator>(user_begin(), user_end());
+ return make_range(user_begin(), user_end());
}
/// \brief Return true if there is exactly one user of this value.
child_iterator child_begin(bool SkipInternal = true) const;
child_iterator child_end() const;
iterator_range<child_iterator> children(bool SkipInternal = true) const {
- return iterator_range<child_iterator>(child_begin(SkipInternal),
- child_end());
+ return make_range(child_begin(SkipInternal), child_end());
}
symbol_iterator symbol_begin() const;
symbol_iterator symbol_end() const;
iterator_range<symbol_iterator> symbols() const {
- return iterator_range<symbol_iterator>(symbol_begin(), symbol_end());
+ return make_range(symbol_begin(), symbol_end());
}
// Cast methods.
relocation_iterator relocation_begin() const;
relocation_iterator relocation_end() const;
iterator_range<relocation_iterator> relocations() const {
- return iterator_range<relocation_iterator>(relocation_begin(),
- relocation_end());
+ return make_range(relocation_begin(), relocation_end());
}
section_iterator getRelocatedSection() const;
static iterator end() { return iterator(nullptr); }
static iterator_range<iterator> entries() {
- return iterator_range<iterator>(begin(), end());
+ return make_range(begin(), end());
}
/// Abstract base class for registry listeners, which are informed when new
ModulePtrSet::iterator begin_added() { return AddedModules.begin(); }
ModulePtrSet::iterator end_added() { return AddedModules.end(); }
iterator_range<ModulePtrSet::iterator> added() {
- return iterator_range<ModulePtrSet::iterator>(begin_added(), end_added());
+ return make_range(begin_added(), end_added());
}
ModulePtrSet::iterator begin_loaded() { return LoadedModules.begin(); }
ExportEntry Finish(Trie);
Finish.moveToEnd();
- return iterator_range<export_iterator>(export_iterator(Start),
- export_iterator(Finish));
+ return make_range(export_iterator(Start), export_iterator(Finish));
}
iterator_range<export_iterator> MachOObjectFile::exports() const {
MachORebaseEntry Finish(Opcodes, is64);
Finish.moveToEnd();
- return iterator_range<rebase_iterator>(rebase_iterator(Start),
- rebase_iterator(Finish));
+ return make_range(rebase_iterator(Start), rebase_iterator(Finish));
}
iterator_range<rebase_iterator> MachOObjectFile::rebaseTable() const {
MachOBindEntry Finish(Opcodes, is64, BKind);
Finish.moveToEnd();
- return iterator_range<bind_iterator>(bind_iterator(Start),
- bind_iterator(Finish));
+ return make_range(bind_iterator(Start), bind_iterator(Finish));
}
iterator_range<bind_iterator> MachOObjectFile::bindTable() const {
iterator_range<MachOObjectFile::load_command_iterator>
MachOObjectFile::load_commands() const {
- return iterator_range<load_command_iterator>(begin_load_commands(),
- end_load_commands());
+ return make_range(begin_load_commands(), end_load_commands());
}
StringRef
iterator_range<MCInst::const_iterator>
HexagonMCInstrInfo::bundleInstructions(MCInst const &MCI) {
assert(isBundle(MCI));
- return iterator_range<MCInst::const_iterator>(
- MCI.begin() + bundleInstructionsOffset, MCI.end());
+ return make_range(MCI.begin() + bundleInstructionsOffset, MCI.end());
}
size_t HexagonMCInstrInfo::bundleSize(MCInst const &MCI) {
class_iterator classes_end() { return SchedClasses.end(); }
const_class_iterator classes_end() const { return SchedClasses.end(); }
iterator_range<class_iterator> classes() {
- return iterator_range<class_iterator>(classes_begin(), classes_end());
+ return make_range(classes_begin(), classes_end());
}
iterator_range<const_class_iterator> classes() const {
- return iterator_range<const_class_iterator>(classes_begin(), classes_end());
+ return make_range(classes_begin(), classes_end());
}
iterator_range<class_iterator> explicit_classes() {
- return iterator_range<class_iterator>(
- classes_begin(), classes_begin() + NumInstrSchedClasses);
+ return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses);
}
iterator_range<const_class_iterator> explicit_classes() const {
- return iterator_range<const_class_iterator>(
- classes_begin(), classes_begin() + NumInstrSchedClasses);
+ return make_range(classes_begin(), classes_begin() + NumInstrSchedClasses);
}
Record *getModelOrItinDef(Record *ProcDef) const {
inst_iterator inst_begin() const{return getInstructionsByEnumValue().begin();}
inst_iterator inst_end() const { return getInstructionsByEnumValue().end(); }
iterator_range<inst_iterator> instructions() const {
- return iterator_range<inst_iterator>(inst_begin(), inst_end());
+ return make_range(inst_begin(), inst_end());
}