[llvm] r268057 - Fix NDEBUG build: variables used only in debug code causing compile error

Krzysztof Parzyszek via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 09:14:00 PDT 2016


Author: kparzysz
Date: Fri Apr 29 11:14:00 2016
New Revision: 268057

URL: http://llvm.org/viewvc/llvm-project?rev=268057&view=rev
Log:
Fix NDEBUG build: variables used only in debug code causing compile error

Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp

Modified: llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp?rev=268057&r1=268056&r2=268057&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonOptAddrMode.cpp Fri Apr 29 11:14:00 2016
@@ -147,6 +147,7 @@ MachineInstr *HexagonOptAddrMode::getRea
     NodeAddr<StmtNode *> ReachingIA = RDN.Addr->getOwner(*DFG);
     DEBUG(dbgs() << "\t\t\t[Def Node]: "
                  << Print<NodeAddr<InstrNode *>>(ReachingIA, *DFG) << "\n");
+    (void)ReachingIA;
     NodeId ReachedID = RDN.Addr->getReachedDef();
     if (!ReachedID)
       return ReachedDefMI;
@@ -233,9 +234,10 @@ bool HexagonOptAddrMode::allValidCandida
       DEBUG(dbgs() << "*** Multiple Reaching Defs found!!! *** \n");
       for (auto DI : ReachingDefs) {
         NodeAddr<UseNode *> DA = DFG->addr<UseNode *>(DI);
-        NodeAddr<StmtNode *> tempIA = DA.Addr->getOwner(*DFG);
+        NodeAddr<StmtNode *> TempIA = DA.Addr->getOwner(*DFG);
+        (void)TempIA;
         DEBUG(dbgs() << "\t\t[Reaching Def]: "
-                     << Print<NodeAddr<InstrNode *>>(tempIA, *DFG) << "\n");
+                     << Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");
       }
       return false;
     }
@@ -253,9 +255,10 @@ void HexagonOptAddrMode::getAllRealUses(
 
     for (auto UI : UseSet) {
       NodeAddr<UseNode *> UA = DFG->addr<UseNode *>(UI);
-      NodeAddr<StmtNode *> tempIA = UA.Addr->getOwner(*DFG);
+      NodeAddr<StmtNode *> TempIA = UA.Addr->getOwner(*DFG);
+      (void)TempIA;
       DEBUG(dbgs() << "\t\t\t[Reached Use]: "
-                   << Print<NodeAddr<InstrNode *>>(tempIA, *DFG) << "\n");
+                   << Print<NodeAddr<InstrNode *>>(TempIA, *DFG) << "\n");
 
       if (UA.Addr->getFlags() & NodeAttrs::PhiRef) {
         NodeAddr<PhiNode *> PA = UA.Addr->getOwner(*DFG);
@@ -580,6 +583,7 @@ bool HexagonOptAddrMode::processBlock(No
       NodeAddr<StmtNode *> OwnerN = UseN.Addr->getOwner(*DFG);
       MachineInstr *UseMI = OwnerN.Addr->getCode();
       unsigned BBNum = UseMI->getParent()->getNumber();
+      (void)BBNum;
       DEBUG(dbgs() << "\t\t[MI <BB#" << BBNum << ">]: " << *UseMI << "\n");
 
       int UseMOnum = -1;




More information about the llvm-commits mailing list