[llvm] r321642 - [RISCV][NFC] Resolve unused variable warning in RISCVISelLowering

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 2 03:54:59 PST 2018


Author: asb
Date: Tue Jan  2 03:54:59 2018
New Revision: 321642

URL: http://llvm.org/viewvc/llvm-project?rev=321642&view=rev
Log:
[RISCV][NFC] Resolve unused variable warning in RISCVISelLowering

XLenVT in LowerFormalArguments is used only in an assert.

Modified:
    llvm/trunk/lib/Target/RISCV/RISCVISelLowering.cpp

Modified: llvm/trunk/lib/Target/RISCV/RISCVISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/RISCV/RISCVISelLowering.cpp?rev=321642&r1=321641&r2=321642&view=diff
==============================================================================
--- llvm/trunk/lib/Target/RISCV/RISCVISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/RISCV/RISCVISelLowering.cpp Tue Jan  2 03:54:59 2018
@@ -580,7 +580,6 @@ SDValue RISCVTargetLowering::LowerFormal
   }
 
   MachineFunction &MF = DAG.getMachineFunction();
-  MVT XLenVT = Subtarget.getXLenVT();
   EVT PtrVT = getPointerTy(DAG.getDataLayout());
 
   if (IsVarArg)
@@ -593,7 +592,7 @@ SDValue RISCVTargetLowering::LowerFormal
 
   for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
     CCValAssign &VA = ArgLocs[i];
-    assert(VA.getLocVT() == XLenVT && "Unhandled argument type");
+    assert(VA.getLocVT() == Subtarget.getXLenVT() && "Unhandled argument type");
     SDValue ArgValue;
     if (VA.isRegLoc())
       ArgValue = unpackFromRegLoc(DAG, Chain, VA, DL);




More information about the llvm-commits mailing list