Merge remote-tracking branch 'origin/GP-821_PiecePathologyInfiniteLoop'

(Closes #2851)
This commit is contained in:
ghidra1 2021-04-02 17:39:58 -04:00
commit 636102a409
3 changed files with 41 additions and 7 deletions

View file

@ -3174,17 +3174,20 @@ void FuncProto::setOutputLock(bool val)
store->getOutput()->setTypeLock(val);
}
/// This value can be used as a hint as to how much of the return value is important and
/// is used to inform the dead code \e consume algorithm.
/// \param val is the estimated number of bytes or 0
/// \return \b true if the value was changed
/// Provide a hint as to how many bytes of the return value are important.
/// The smallest hint is used to inform the dead-code removal algorithm.
/// \param val is the hint (number of bytes or 0 for all bytes)
/// \return \b true if the smallest hint has changed
bool FuncProto::setReturnBytesConsumed(int4 val)
{
int4 oldVal = returnBytesConsumed;
if (oldVal == 0 || val < oldVal)
if (val == 0)
return false;
if (returnBytesConsumed == 0 || val < returnBytesConsumed) {
returnBytesConsumed = val;
return (oldVal != val);
return true;
}
return false;
}
/// \brief Assuming \b this prototype is locked, calculate the \e extrapop