Move variable that's unused in an NDEBUG build inside the DEBUG() macro, fixing

lib/CodeGen/RegAllocGreedy.cpp:233: error: unused variable 'TRC' [-Wunused-variable]

llvm-svn: 121594
This commit is contained in:
Nick Lewycky 2010-12-10 23:05:10 +00:00
parent 235c276442
commit 07a95f8f06
1 changed files with 4 additions and 3 deletions

View File

@ -230,8 +230,10 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg,
SmallVector<unsigned, 8> PhysRegSpillCands, ReassignCands;
// Check for an available register in this class.
const TargetRegisterClass *TRC = MRI->getRegClass(VirtReg.reg);
DEBUG(dbgs() << "RegClass: " << TRC->getName() << ' ');
DEBUG({
const TargetRegisterClass *TRC = MRI->getRegClass(VirtReg.reg);
dbgs() << "RegClass: " << TRC->getName() << ' ');
});
AllocationOrder Order(VirtReg.reg, *VRM, ReservedRegs);
while (unsigned PhysReg = Order.next()) {
@ -324,4 +326,3 @@ bool RAGreedy::runOnMachineFunction(MachineFunction &mf) {
return true;
}