[llvm] dd82fd4 - [Xtensa] Fix Clang warnings after #92960

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 16:47:32 PDT 2024


Author: Fangrui Song
Date: 2024-06-04T16:47:28-07:00
New Revision: dd82fd4744397e0510c8204f1a6031441e21858e

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

LOG: [Xtensa] Fix Clang warnings after #92960

Added: 
    

Modified: 
    llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
    llvm/lib/Target/Xtensa/XtensaFrameLowering.h
    llvm/lib/Target/Xtensa/XtensaRegisterInfo.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp b/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
index 71b1bb674ca78..445fd75e29f37 100644
--- a/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
+++ b/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp
@@ -25,7 +25,7 @@ using namespace llvm;
 XtensaFrameLowering::XtensaFrameLowering(const XtensaSubtarget &STI)
     : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, Align(4), 0,
                           Align(4)),
-      STI(STI), TII(*STI.getInstrInfo()), TRI(STI.getRegisterInfo()) {}
+      TII(*STI.getInstrInfo()), TRI(STI.getRegisterInfo()) {}
 
 bool XtensaFrameLowering::hasFP(const MachineFunction &MF) const {
   const MachineFrameInfo &MFI = MF.getFrameInfo();

diff  --git a/llvm/lib/Target/Xtensa/XtensaFrameLowering.h b/llvm/lib/Target/Xtensa/XtensaFrameLowering.h
index 31c496d2b89de..9120215af08b5 100644
--- a/llvm/lib/Target/Xtensa/XtensaFrameLowering.h
+++ b/llvm/lib/Target/Xtensa/XtensaFrameLowering.h
@@ -18,7 +18,6 @@ class XtensaInstrInfo;
 class XtensaRegisterInfo;
 
 class XtensaFrameLowering : public TargetFrameLowering {
-  const XtensaSubtarget &STI;
   const XtensaInstrInfo &TII;
   const XtensaRegisterInfo *TRI;
 

diff  --git a/llvm/lib/Target/Xtensa/XtensaRegisterInfo.h b/llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
index a4eda87f4c8b7..8643ebb1c0f15 100644
--- a/llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
+++ b/llvm/lib/Target/Xtensa/XtensaRegisterInfo.h
@@ -24,7 +24,7 @@ class TargetRegisterClass;
 class XtensaInstrInfo;
 class XtensaSubtarget;
 
-struct XtensaRegisterInfo : public XtensaGenRegisterInfo {
+class XtensaRegisterInfo : public XtensaGenRegisterInfo {
 public:
   const XtensaSubtarget &Subtarget;
 


        


More information about the llvm-commits mailing list