From dd82fd4744397e0510c8204f1a6031441e21858e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 4 Jun 2024 16:47:28 -0700 Subject: [PATCH] [Xtensa] Fix Clang warnings after #92960 --- llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp | 2 +- llvm/lib/Target/Xtensa/XtensaFrameLowering.h | 1 - llvm/lib/Target/Xtensa/XtensaRegisterInfo.h | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp b/llvm/lib/Target/Xtensa/XtensaFrameLowering.cpp index 71b1bb674ca78e..445fd75e29f37f 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 31c496d2b89de5..9120215af08b52 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 a4eda87f4c8b74..8643ebb1c0f157 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;