aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-12-10 23:05:10 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-12-10 23:05:10 +0000
commit5a4308bca86728767ea5d9e5df8d8e3351e33c9a (patch)
tree4210f0bcccacf9568b2c8a77742ac9c428e5d535
parent63ee22065dc4e8af7f4bf99c25b82da132700267 (diff)
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
-rw-r--r--lib/CodeGen/RegAllocGreedy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/RegAllocGreedy.cpp b/lib/CodeGen/RegAllocGreedy.cpp
index b527b9fe4e..e88016fbb3 100644
--- a/lib/CodeGen/RegAllocGreedy.cpp
+++ b/lib/CodeGen/RegAllocGreedy.cpp
@@ -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;
}
-