[llvm] r261500 - CodeGen: Add constructor for MIBuilder from a bundle_iterator, NFC
Duncan P. N. Exon Smith via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 21 13:15:38 PST 2016
Author: dexonsmith
Date: Sun Feb 21 15:15:37 2016
New Revision: 261500
URL: http://llvm.org/viewvc/llvm-project?rev=261500&view=rev
Log:
CodeGen: Add constructor for MIBuilder from a bundle_iterator, NFC
Don't require explicit conversions for creating a MachineInstrBuilder
from a bundle_iterator.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
Modified: llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h?rev=261500&r1=261499&r2=261500&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineInstrBuilder.h Sun Feb 21 15:15:37 2016
@@ -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; }
More information about the llvm-commits
mailing list