[llvm] r248562 - ARM: make -Asserts, -Werror=unused-variable build happy

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 24 22:41:02 PDT 2015


Author: compnerd
Date: Fri Sep 25 00:41:02 2015
New Revision: 248562

URL: http://llvm.org/viewvc/llvm-project?rev=248562&view=rev
Log:
ARM: make -Asserts,-Werror=unused-variable build happy

The value was only used in an assertion.  Sink the variable usage into the
assertion.

Modified:
    llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp

Modified: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp?rev=248562&r1=248561&r2=248562&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp Fri Sep 25 00:41:02 2015
@@ -6688,8 +6688,8 @@ SDValue ARMTargetLowering::LowerWindowsD
 
 SDValue ARMTargetLowering::LowerDIV_Windows(SDValue Op, SelectionDAG &DAG,
                                             bool Signed) const {
-  EVT VT = Op.getValueType();
-  assert(VT == MVT::i32 && "unexpected type for custom lowering DIV");
+  assert(Op.getValueType() == MVT::i32 &&
+         "unexpected type for custom lowering DIV");
   SDLoc dl(Op);
 
   SDValue DBZCHK = DAG.getNode(ARMISD::WIN__DBZCHK, dl, MVT::Other,
@@ -6704,8 +6704,8 @@ void ARMTargetLowering::ExpandDIV_Window
   const auto &DL = DAG.getDataLayout();
   const auto &TLI = DAG.getTargetLoweringInfo();
 
-  EVT VT = Op.getValueType();
-  assert(VT == MVT::i64 && "unexpected type for custom lowering DIV");
+  assert(Op.getValueType() == MVT::i64 &&
+         "unexpected type for custom lowering DIV");
   SDLoc dl(Op);
 
   SDValue Lo = DAG.getNode(ISD::EXTRACT_ELEMENT, dl, MVT::i32, Op.getOperand(1),




More information about the llvm-commits mailing list