[llvm] 3c47e63 - [SystemZ] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 6 14:52:28 PST 2024


Author: Kazu Hirata
Date: 2024-12-06T14:52:22-08:00
New Revision: 3c47e63723b1aa9e76f30fc8d1acef9caf4ea783

URL: https://github.com/llvm/llvm-project/commit/3c47e63723b1aa9e76f30fc8d1acef9caf4ea783
DIFF: https://github.com/llvm/llvm-project/commit/3c47e63723b1aa9e76f30fc8d1acef9caf4ea783.diff

LOG: [SystemZ] Fix a warning

This patch fixes:

  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:953:30: error:
  unused variable 'TRI' [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 67abc714287e2c..add52b4efd7112 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -961,6 +961,7 @@ SystemZTargetLowering::emitEHSjLjSetJmp(MachineInstr &MI,
   Register DstReg = MI.getOperand(0).getReg();
   const TargetRegisterClass *RC = MRI.getRegClass(DstReg);
   assert(TRI->isTypeLegalForClass(*RC, MVT::i32) && "Invalid destination!");
+  (void)TRI;
   Register mainDstReg = MRI.createVirtualRegister(RC);
   Register restoreDstReg = MRI.createVirtualRegister(RC);
 


        


More information about the llvm-commits mailing list