CodeGen: Add constructor for MIBuilder from a bundle_iterator, NFC
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 21 Feb 2016 21:15:37 +0000 (21:15 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sun, 21 Feb 2016 21:15:37 +0000 (21:15 +0000)
Don't require explicit conversions for creating a MachineInstrBuilder
from a bundle_iterator.

llvm-svn: 261500

llvm/include/llvm/CodeGen/MachineInstrBuilder.h

index 8fe9b28..aea7f8e 100644 (file)
@@ -51,6 +51,8 @@ public:
   /// Create a MachineInstrBuilder for manipulating an existing instruction.
   /// F must be the machine function that was used to allocate I.
   MachineInstrBuilder(MachineFunction &F, MachineInstr *I) : MF(&F), MI(I) {}
+  MachineInstrBuilder(MachineFunction &F, MachineBasicBlock::iterator I)
+      : MF(&F), MI(&*I) {}
 
   /// Allow automatic conversion to the machine instruction we are working on.
   operator MachineInstr*() const { return MI; }