forked from OSchip/llvm-project
add operand iterator apis to MachineInstr, patch by ether zhhb.
llvm-svn: 118862
This commit is contained in:
parent
1e57493196
commit
7fe1100c26
|
@ -168,6 +168,16 @@ public:
|
||||||
///
|
///
|
||||||
unsigned getNumExplicitOperands() const;
|
unsigned getNumExplicitOperands() const;
|
||||||
|
|
||||||
|
/// iterator/begin/end - Iterate over all operands of a machine instruction.
|
||||||
|
typedef std::vector<MachineOperand>::iterator mop_iterator;
|
||||||
|
typedef std::vector<MachineOperand>::const_iterator const_mop_iterator;
|
||||||
|
|
||||||
|
mop_iterator operands_begin() { return Operands.begin(); }
|
||||||
|
mop_iterator operands_end() { return Operands.end(); }
|
||||||
|
|
||||||
|
const_mop_iterator operands_begin() const { return Operands.begin(); }
|
||||||
|
const_mop_iterator operands_end() const { return Operands.end(); }
|
||||||
|
|
||||||
/// Access to memory operands of the instruction
|
/// Access to memory operands of the instruction
|
||||||
mmo_iterator memoperands_begin() const { return MemRefs; }
|
mmo_iterator memoperands_begin() const { return MemRefs; }
|
||||||
mmo_iterator memoperands_end() const { return MemRefsEnd; }
|
mmo_iterator memoperands_end() const { return MemRefsEnd; }
|
||||||
|
|
Loading…
Reference in New Issue