diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-09-04 23:05:29 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-09-04 23:05:29 +0000 |
| commit | 22f29396dbc646017c3ce62733d90d7885c27790 (patch) | |
| tree | 71df05fb22a72feeb84cf15049314f9d74c0d4e3 | |
| parent | 8386105f3fcb7b22118b788e87c3a6dd002a3e79 (diff) | |
| download | bcm5719-llvm-22f29396dbc646017c3ce62733d90d7885c27790.tar.gz bcm5719-llvm-22f29396dbc646017c3ce62733d90d7885c27790.zip | |
Add some short-hand accessors
llvm-svn: 30104
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineInstr.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstr.h b/llvm/include/llvm/CodeGen/MachineInstr.h index 35092b5536f..443956e401d 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; } |

