summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen/MachineInstr.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-09-04 23:05:29 +0000
committerChris Lattner <sabre@nondot.org>2006-09-04 23:05:29 +0000
commit930ab738c7d323cf9552bba2652af6aa361e9967 (patch)
tree1b3555bfd4090dd1ab1d77cd099c10e3bb8ed4fc /include/llvm/CodeGen/MachineInstr.h
parent3a02f020eb72cb10f7f794532ddc35e478f7e86b (diff)
downloadllvm-930ab738c7d323cf9552bba2652af6aa361e9967.tar.gz
llvm-930ab738c7d323cf9552bba2652af6aa361e9967.tar.bz2
llvm-930ab738c7d323cf9552bba2652af6aa361e9967.tar.xz
Add some short-hand accessors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30104 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstr.h')
-rw-r--r--include/llvm/CodeGen/MachineInstr.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h
index 35092b5536..443956e401 100644
--- a/include/llvm/CodeGen/MachineInstr.h
+++ b/include/llvm/CodeGen/MachineInstr.h
@@ -111,6 +111,10 @@ public:
/// Accessors that tell you what kind of MachineOperand you're looking at.
///
+ bool isReg() const { return opType == MO_Register; }
+ bool isImm() const { return opType == MO_Immediate; }
+ bool isMBB() const { return opType == MO_MachineBasicBlock; }
+
bool isRegister() const { return opType == MO_Register; }
bool isImmediate() const { return opType == MO_Immediate; }
bool isMachineBasicBlock() const { return opType == MO_MachineBasicBlock; }