CodeGen: Add constructor for MIBuilder from a bundle_iterator, NFC

Don't require explicit conversions for creating a MachineInstrBuilder
from a bundle_iterator.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith 2016-02-21 21:15:37 +00:00
parent 7b83cb68d4
commit 151a6ae8d1

View 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; }