index passed in was out of range for the number of parameter attributes set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32794
91177308-0d34-0410-b5e6-
96231b3b80d8
FunctionType::ParameterAttributes
FunctionType::getParamAttrs(unsigned Idx) const {
if (!ParamAttrs)
- return ParameterAttributes(0);
- if (Idx > ParamAttrs->size())
- return ParameterAttributes(0);
+ return NoAttributeSet;
+ if (Idx >= ParamAttrs->size())
+ return NoAttributeSet;
return (*ParamAttrs)[Idx];
}