Fix out of bounds access in hasStructRetAttr
llvm-svn: 254273
This commit is contained in:
parent
9551a44d0c
commit
5e30bbe7ae
|
@ -1730,6 +1730,9 @@ public:
|
|||
/// \brief Determine if the call returns a structure through first
|
||||
/// pointer argument.
|
||||
bool hasStructRetAttr() const {
|
||||
if (getNumArgOperands() == 0)
|
||||
return false;
|
||||
|
||||
// Be friendly and also check the callee.
|
||||
return paramHasAttr(1, Attribute::StructRet);
|
||||
}
|
||||
|
@ -3614,6 +3617,9 @@ public:
|
|||
/// \brief Determine if the call returns a structure through first
|
||||
/// pointer argument.
|
||||
bool hasStructRetAttr() const {
|
||||
if (getNumArgOperands() == 0)
|
||||
return false;
|
||||
|
||||
// Be friendly and also check the callee.
|
||||
return paramHasAttr(1, Attribute::StructRet);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue