[RegBankSelect] Use const_iterator instead of iterator for repairReg.
The repairing code has no reason to change the source or destination of
the registers.
llvm-svn: 272163
diff --git a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
index 726ef26..daf1685 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp
@@ -106,7 +106,7 @@
void RegBankSelect::repairReg(
MachineOperand &MO, const RegisterBankInfo::ValueMapping &ValMapping,
RegBankSelect::RepairingPlacement &RepairPt,
- const iterator_range<SmallVectorImpl<unsigned>::iterator> &NewVRegs) {
+ const iterator_range<SmallVectorImpl<unsigned>::const_iterator> &NewVRegs) {
assert(ValMapping.BreakDown.size() == 1 && "Not yet implemented");
// Assume we are repairing a use and thus, the original reg will be
// the source of the repairing.