Fixed non-const iterator error.
authorLang Hames <lhames@gmail.com>
Sat, 18 Sep 2010 09:49:08 +0000 (09:49 +0000)
committerLang Hames <lhames@gmail.com>
Sat, 18 Sep 2010 09:49:08 +0000 (09:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114273 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegAllocPBQP.cpp

index 6b2e5c04807629f40cfa64374213bf6ec35b4be1..6629b38fb75154d7d9b6edd7fd75e2bf8cb7e562 100644 (file)
@@ -204,7 +204,7 @@ std::auto_ptr<PBQPRAProblem> 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);