summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
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
commit07a95f8f06dd2be38db26dd723622c8828701d47 (patch)
tree0b68ab92fffb91b0fbe1e52a2bca28f5325b926f /llvm/lib/CodeGen
parent235c27644229204535e3b48240f4e22ef9734da2 (diff)
downloadbcm5719-llvm-07a95f8f06dd2be38db26dd723622c8828701d47.tar.gz
bcm5719-llvm-07a95f8f06dd2be38db26dd723622c8828701d47.zip
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
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegAllocGreedy.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index b527b9fe4eb..e88016fbb37 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/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;
}
-
OpenPOWER on IntegriCloud