aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineOperand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r--include/llvm/CodeGen/MachineOperand.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index 66f106a401..a782ff538c 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/include/llvm/CodeGen/MachineOperand.h
@@ -175,6 +175,13 @@ public:
assert(isRegister() && "Wrong MachineOperand accessor");
return IsKill;
}
+
+ /// getNextOperandForReg - Return the next MachineOperand in the function that
+ /// uses or defines this register.
+ MachineOperand *getNextOperandForReg() const {
+ assert(isRegister() && "This is not a register operand!");
+ return Contents.Reg.Next;
+ }
//===--------------------------------------------------------------------===//
// Mutators for Register Operands