aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetInstrDesc.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Target/TargetInstrDesc.h')
-rw-r--r--include/llvm/Target/TargetInstrDesc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetInstrDesc.h b/include/llvm/Target/TargetInstrDesc.h
index 6a08e8f24c..a127aed8f6 100644
--- a/include/llvm/Target/TargetInstrDesc.h
+++ b/include/llvm/Target/TargetInstrDesc.h
@@ -152,6 +152,12 @@ public:
return -1;
}
+ /// getRegClass - Returns the register class constraint for OpNum, or NULL.
+ const TargetRegisterClass *getRegClass(unsigned OpNum,
+ const TargetRegisterInfo *TRI) const {
+ return OpNum < NumOperands ? OpInfo[OpNum].getRegClass(TRI) : 0;
+ }
+
/// getOpcode - Return the opcode number for this descriptor.
unsigned getOpcode() const {
return Opcode;