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;