From: Nick Lewycky Date: Fri, 10 Dec 2010 23:05:10 +0000 (+0000) Subject: Move variable that's unused in an NDEBUG build inside the DEBUG() macro, fixing X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5a4308bca86728767ea5d9e5df8d8e3351e33c9a;p=oota-llvm.git 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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121594 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp index b527b9fe4eb..e88016fbb37 100644 --- a/lib/CodeGen/RegAllocGreedy.cpp +++ b/lib/CodeGen/RegAllocGreedy.cpp @@ -230,8 +230,10 @@ unsigned RAGreedy::selectOrSplit(LiveInterval &VirtReg, SmallVector 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; } -