From 22f29396dbc646017c3ce62733d90d7885c27790 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 4 Sep 2006 23:05:29 +0000 Subject: [PATCH] Add some short-hand accessors llvm-svn: 30104 --- llvm/include/llvm/CodeGen/MachineInstr.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index 35092b5536f3..443956e401d2 100644 --- a/llvm/include/llvm/CodeGen/MachineInstr.h +++ b/llvm/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; }