[llvm] 0a043e6 - [RISCV][GlobalISel] Remove unused variable 'Index' (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 1 16:11:01 PDT 2023


Author: Jie Fu
Date: 2023-06-02T07:10:24+08:00
New Revision: 0a043e6c74a42ddd65ce9dd4455c1140eade9eab

URL: https://github.com/llvm/llvm-project/commit/0a043e6c74a42ddd65ce9dd4455c1140eade9eab
DIFF: https://github.com/llvm/llvm-project/commit/0a043e6c74a42ddd65ce9dd4455c1140eade9eab.diff

LOG: [RISCV][GlobalISel] Remove unused variable 'Index' (NFC)

/data/llvm-project/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp:272:12: error: variable 'Index' set but not used [-Werror,-Wunused-but-set-variable]
  unsigned Index = 0;
           ^
1 error generated.

Added: 
    

Modified: 
    llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
index f8389376b2020..5505f89a32f21 100644
--- a/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
+++ b/llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp
@@ -269,14 +269,11 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
 
   SmallVector<ArgInfo, 32> SplitArgInfos;
   SmallVector<ISD::OutputArg, 8> Outs;
-  unsigned Index = 0;
   for (auto &AInfo : Info.OrigArgs) {
     // Handle any required unmerging of split value types from a given VReg into
     // physical registers. ArgInfo objects are constructed correspondingly and
     // appended to SplitArgInfos.
     splitToValueTypes(AInfo, SplitArgInfos, DL, CC);
-
-    ++Index;
   }
 
   // TODO: Support tail calls.


        


More information about the llvm-commits mailing list