From b1147c46603174d4c8e4d31581205a12138bef64 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Tue, 4 Oct 2011 20:18:39 +0000 Subject: [PATCH] Properly use const_iterator. This should unbreak the Windows build. llvm-svn: 141105 --- llvm/utils/TableGen/CodeGenRegisters.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/utils/TableGen/CodeGenRegisters.cpp b/llvm/utils/TableGen/CodeGenRegisters.cpp index b09dfe948278..b7315446163d 100644 --- a/llvm/utils/TableGen/CodeGenRegisters.cpp +++ b/llvm/utils/TableGen/CodeGenRegisters.cpp @@ -757,11 +757,11 @@ void CodeGenRegBank::computeInferredRegisterClasses() { // Compute the set of registers supporting each SubRegIndex. SubReg2SetMap SRSets; - for (CodeGenRegister::Set::iterator RI = RC.getMembers().begin(), + for (CodeGenRegister::Set::const_iterator RI = RC.getMembers().begin(), RE = RC.getMembers().end(); RI != RE; ++RI) { - CodeGenRegister::SubRegMap SRM = (*RI)->getSubRegs(); - for (CodeGenRegister::SubRegMap::iterator I = SRM.begin(), E = SRM.end(); - I != E; ++I) + const CodeGenRegister::SubRegMap &SRM = (*RI)->getSubRegs(); + for (CodeGenRegister::SubRegMap::const_iterator I = SRM.begin(), + E = SRM.end(); I != E; ++I) SRSets[I->first].insert(*RI); }