summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-21 21:15:37 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2016-02-21 21:15:37 +0000
commite5407d1ad84beeb5e5a2f9522153e9ec5d58a0d8 (patch)
tree40965a3d57a0fde84f67fa8ae2ae7aa5bb831c6a
parentc10f961a6a312670bac2782a6c036cd19116d046 (diff)
downloadbcm5719-llvm-e5407d1ad84beeb5e5a2f9522153e9ec5d58a0d8.tar.gz
bcm5719-llvm-e5407d1ad84beeb5e5a2f9522153e9ec5d58a0d8.zip
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
-rw-r--r--llvm/include/llvm/CodeGen/MachineInstrBuilder.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineInstrBuilder.h b/llvm/include/llvm/CodeGen/MachineInstrBuilder.h
index 8fe9b280d5d..aea7f8e329a 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; }
OpenPOWER on IntegriCloud