Small parameter attributes cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44433 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2007-11-29 08:30:15 +00:00
parent d7205e6ba1
commit fd8890dbee

View File

@ -385,8 +385,9 @@ void CallInst::setParamAttrs(const ParamAttrsList *newAttrs) {
bool CallInst::paramHasAttr(uint16_t i, ParameterAttributes attr) const {
if (ParamAttrs && ParamAttrs->paramHasAttr(i, attr))
return true;
const Function *F = getCalledFunction();
return F && F->getParamAttrs() && F->getParamAttrs()->paramHasAttr(i, attr);
if (const Function *F = getCalledFunction())
return F->paramHasAttr(i, attr);
return false;
}
@ -462,8 +463,9 @@ void InvokeInst::setParamAttrs(const ParamAttrsList *newAttrs) {
bool InvokeInst::paramHasAttr(uint16_t i, ParameterAttributes attr) const {
if (ParamAttrs && ParamAttrs->paramHasAttr(i, attr))
return true;
const Function *F = getCalledFunction();
return F && F->getParamAttrs() && F->getParamAttrs()->paramHasAttr(i, attr);
if (const Function *F = getCalledFunction())
return F->paramHasAttr(i, attr);
return false;
}