Skip to content

Commit

Permalink
Fix repeated warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasSte committed Jul 16, 2024
1 parent 1135b7a commit eecfa34
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion llvm/lib/Target/SBF/SBFRegisterInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,13 @@ int SBFRegisterInfo::resolveInternalFrameIndex(
const SBFFunctionInfo *SBFFuncInfo = MF.getInfo<SBFFunctionInfo>();
int Offset = MFI.getObjectOffset(FI);

static Function *OldMF = nullptr;
if (!MF.getSubtarget<SBFSubtarget>().getHasDynamicFrames() &&
SBFFuncInfo->containsFrameIndex(FI)) {
Offset = SBFRegisterInfo::FrameLength - Offset;
if (static_cast<uint64_t>(Offset) < MFI.getStackSize()) {
if (static_cast<uint64_t>(Offset) < MFI.getStackSize() &&
OldMF != &(MF.getFunction())) {
OldMF = &(MF.getFunction());
Function &OffendingFunction = MF.getFunction();
dbgs() << "Warning: A function call in method "
<< OffendingFunction.getName()
Expand Down

0 comments on commit eecfa34

Please sign in to comment.