Add new helper method addRegDef
authorChris Lattner <sabre@nondot.org>
Wed, 15 Jan 2003 17:18:22 +0000 (17:18 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 15 Jan 2003 17:18:22 +0000 (17:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5289 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineInstrBuilder.h

index 2003f860bc01c26cf007af0403a2feb3b4c6504c..3d3015588b1f3b4a96c3e619df96e7e93f2eed47 100644 (file)
@@ -43,13 +43,11 @@ public:
     return *this;
   }
 
-  /// addClobber - Assert that this MI is going to clobber a specific
-  /// register. Useful for instructions that always clobber certain hard regs.
-  /// (Same as addReg(RegNo, true) but shorter and more obvious).
+  /// addRegDef - Add an LLVM value that is to be defined as a register... this
+  /// is the same as addReg(V, MOTy::Def).
   ///
-  const MachineInstrBuilder &addClobber(int RegNo) const {
-    MI->addRegOperand(RegNo, MOTy::Def);
-    return *this;
+  const MachineInstrBuilder &addRegDef(Value *V) const {
+    return addReg(V, MOTy::Def);
   }
 
   /// addPCDisp - Add an LLVM value to be treated as a PC relative