diff --git a/lib/CodeGen/RegAllocPBQP.cpp b/lib/CodeGen/RegAllocPBQP.cpp index 6b2e5c04807..6629b38fb75 100644 --- a/lib/CodeGen/RegAllocPBQP.cpp +++ b/lib/CodeGen/RegAllocPBQP.cpp @@ -204,7 +204,7 @@ std::auto_ptr PBQPBuilder::build( addSpillCosts(g.getNodeCosts(node), spillCost); } - for (RegSet::iterator vr1Itr = vregs.begin(), vrEnd = vregs.end(); + for (RegSet::const_iterator vr1Itr = vregs.begin(), vrEnd = vregs.end(); vr1Itr != vrEnd; ++vr1Itr) { unsigned vr1 = *vr1Itr; const LiveInterval &l1 = lis->getInterval(vr1);