From b889b693e478c523afdf21ed64e401c646a8ac40 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 3 Aug 2003 13:49:25 +0000 Subject: [PATCH] Make it easier to debug by exposing a temporary git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7504 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/MRegisterInfo.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Target/MRegisterInfo.cpp b/lib/Target/MRegisterInfo.cpp index d52777da537..634a3c88d8d 100644 --- a/lib/Target/MRegisterInfo.cpp +++ b/lib/Target/MRegisterInfo.cpp @@ -20,10 +20,10 @@ MRegisterInfo::MRegisterInfo(const MRegisterDesc *D, unsigned NR, // Fill in the PhysRegClasses map for (MRegisterInfo::regclass_iterator I = regclass_begin(), E = regclass_end(); I != E; ++I) - for (unsigned i=0; i < (*I)->getNumRegs(); ++i) { - assert(PhysRegClasses[(*I)->getRegister(i)] == 0 && - "Register in more than one class?"); - PhysRegClasses[(*I)->getRegister(i)] = *I; + for (unsigned i = 0, e = (*I)->getNumRegs(); i != e; ++i) { + unsigned Reg = (*I)->getRegister(i); + assert(PhysRegClasses[Reg] == 0 && "Register in more than one class?"); + PhysRegClasses[Reg] = *I; } CallFrameSetupOpcode = CFSO; -- 2.34.1