From e5407d1ad84beeb5e5a2f9522153e9ec5d58a0d8 Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Sun, 21 Feb 2016 21:15:37 +0000 Subject: [PATCH] CodeGen: Add constructor for MIBuilder from a bundle_iterator, NFC Don't require explicit conversions for creating a MachineInstrBuilder from a bundle_iterator. llvm-svn: 261500 --- llvm/include/llvm/CodeGen/MachineInstrBuilder.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h index 8fe9b28..aea7f8e 100644 --- a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h +++ b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h @@ -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; } -- 2.7.4