[llvm] da9fece - [Sparc] Fix a warning
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 3 08:12:20 PST 2024
Author: Kazu Hirata
Date: 2024-11-03T08:12:14-08:00
New Revision: da9fece01278b85a3ead8f6a72faf7762778f44a
URL: https://github.com/llvm/llvm-project/commit/da9fece01278b85a3ead8f6a72faf7762778f44a
DIFF: https://github.com/llvm/llvm-project/commit/da9fece01278b85a3ead8f6a72faf7762778f44a.diff
LOG: [Sparc] Fix a warning
This patch fixes:
llvm/lib/Target/Sparc/SparcFrameLowering.cpp:226:29: error: unused
variable 'RegInfo' [-Werror,-Wunused-variable]
Added:
Modified:
llvm/lib/Target/Sparc/SparcFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/Sparc/SparcFrameLowering.cpp b/llvm/lib/Target/Sparc/SparcFrameLowering.cpp
index 5da45e4a7ec746..9c51d95d3cac79 100644
--- a/llvm/lib/Target/Sparc/SparcFrameLowering.cpp
+++ b/llvm/lib/Target/Sparc/SparcFrameLowering.cpp
@@ -223,8 +223,6 @@ bool SparcFrameLowering::hasReservedCallFrame(const MachineFunction &MF) const {
// frame pointer register. This is true if the function has variable sized
// allocas or if frame pointer elimination is disabled.
bool SparcFrameLowering::hasFPImpl(const MachineFunction &MF) const {
- const TargetRegisterInfo *RegInfo = MF.getSubtarget().getRegisterInfo();
-
const MachineFrameInfo &MFI = MF.getFrameInfo();
return MF.getTarget().Options.DisableFramePointerElim(MF) ||
MFI.hasVarSizedObjects() || MFI.isFrameAddressTaken();
More information about the llvm-commits
mailing list