[llvm] r248754 - Fix unused variable warning in non-debug builds.

Richard Trieu via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 15:54:43 PDT 2015


Author: rtrieu
Date: Mon Sep 28 17:54:43 2015
New Revision: 248754

URL: http://llvm.org/viewvc/llvm-project?rev=248754&view=rev
Log:
Fix unused variable warning in non-debug builds.

Modified:
    llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp

Modified: llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp?rev=248754&r1=248753&r2=248754&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetInstrInfo.cpp Mon Sep 28 17:54:43 2015
@@ -128,7 +128,8 @@ MachineInstr *TargetInstrInfo::commuteIn
     // No idea how to commute this instruction. Target should implement its own.
     return nullptr;
 
-  unsigned CommutableOpIdx1 = Idx1, CommutableOpIdx2 = Idx2;
+  unsigned CommutableOpIdx1 = Idx1; (void)CommutableOpIdx1;
+  unsigned CommutableOpIdx2 = Idx2; (void)CommutableOpIdx2;
   assert(findCommutedOpIndices(MI, CommutableOpIdx1, CommutableOpIdx2) &&
          CommutableOpIdx1 == Idx1 && CommutableOpIdx2 == Idx2 &&
          "TargetInstrInfo::CommuteInstructionImpl(): not commutable operands.");




More information about the llvm-commits mailing list