git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@254273
91177308-0d34-0410-b5e6-
96231b3b80d8
/// \brief Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
/// \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);
}
// Be friendly and also check the callee.
return paramHasAttr(1, Attribute::StructRet);
}
/// \brief Determine if the call returns a structure through first
/// pointer argument.
bool hasStructRetAttr() const {
/// \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);
}
// Be friendly and also check the callee.
return paramHasAttr(1, Attribute::StructRet);
}