diff options
author | Chris Lattner <sabre@nondot.org> | 2007-12-30 00:35:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-12-30 00:35:18 +0000 |
commit | c8313f1d7957843d6032170573716cf8e6aeb93c (patch) | |
tree | 89dcc6e7855cc29e65c908680962ef6c2cf7f836 /include/llvm/CodeGen/MachineInstrBuilder.h | |
parent | e86d0d089e787ca5369f7ae013caa976cb1c193e (diff) |
switch MIBuilder over to use the simplified operand addition methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45431 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineInstrBuilder.h')
-rw-r--r-- | include/llvm/CodeGen/MachineInstrBuilder.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/CodeGen/MachineInstrBuilder.h b/include/llvm/CodeGen/MachineInstrBuilder.h index 346c66bd04..39f241a54d 100644 --- a/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/include/llvm/CodeGen/MachineInstrBuilder.h @@ -40,46 +40,47 @@ public: MachineInstrBuilder &addReg(unsigned RegNo, bool isDef = false, bool isImp = false, bool isKill = false, bool isDead = false, unsigned SubReg = 0) const { - MI->addRegOperand(RegNo, isDef, isImp, isKill, isDead, SubReg); + MI->addOperand(MachineOperand::CreateReg(RegNo, isDef, isImp, isKill, + isDead, SubReg)); return *this; } /// addImm - Add a new immediate operand. /// const MachineInstrBuilder &addImm(int64_t Val) const { - MI->addImmOperand(Val); + MI->addOperand(MachineOperand::CreateImm(Val)); return *this; } const MachineInstrBuilder &addMBB(MachineBasicBlock *MBB) const { - MI->addMachineBasicBlockOperand(MBB); + MI->addOperand(MachineOperand::CreateBasicBlock(MBB)); return *this; } const MachineInstrBuilder &addFrameIndex(unsigned Idx) const { - MI->addFrameIndexOperand(Idx); + MI->addOperand(MachineOperand::CreateFrameIndex(Idx)); return *this; } const MachineInstrBuilder &addConstantPoolIndex(unsigned Idx, int Offset = 0) const { - MI->addConstantPoolIndexOperand(Idx, Offset); + MI->addOperand(MachineOperand::CreateConstantPoolIndex(Idx, Offset)); return *this; } const MachineInstrBuilder &addJumpTableIndex(unsigned Idx) const { - MI->addJumpTableIndexOperand(Idx); + MI->addOperand(MachineOperand::CreateJumpTableIndex(Idx)); return *this; } const MachineInstrBuilder &addGlobalAddress(GlobalValue *GV, int Offset = 0) const { - MI->addGlobalAddressOperand(GV, Offset); + MI->addOperand(MachineOperand::CreateGlobalAddress(GV, Offset)); return *this; } const MachineInstrBuilder &addExternalSymbol(const char *FnName) const{ - MI->addExternalSymbolOperand(FnName); + MI->addOperand(MachineOperand::CreateExternalSymbol(FnName, 0)); return *this; } }; |