MachineBasicBlock: Add liveins() method returning an iterator_range
[oota-llvm.git] / lib / CodeGen / LivePhysRegs.cpp
index cbd98e3f3450f152d92b4056aa6429af25efe1ef..7915d6c4e7c448142b91915aa64004d2be6c5470 100644 (file)
@@ -128,8 +128,8 @@ void LivePhysRegs::dump() const {
 
 /// Add live-in registers of basic block \p MBB to \p LiveRegs.
 static void addLiveIns(LivePhysRegs &LiveRegs, const MachineBasicBlock &MBB) {
-  for (unsigned Reg : make_range(MBB.livein_begin(), MBB.livein_end()))
-    LiveRegs.addReg(Reg);
+  for (unsigned LI : MBB.liveins())
+    LiveRegs.addReg(LI);
 }
 
 /// Add pristine registers to the given \p LiveRegs. This function removes