mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-09 05:31:19 +00:00
Be consistent with other attribute methods, and
check the callee also if it is known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46206 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
da9bb3578e
commit
53d4afcee9
@ -406,7 +406,13 @@ bool CallInst::isStructReturn() const {
|
||||
|
||||
/// @brief Determine if any call argument is an aggregate passed by value.
|
||||
bool CallInst::hasByValArgument() const {
|
||||
return ParamAttrs && ParamAttrs->hasAttrSomewhere(ParamAttr::ByVal);
|
||||
if (ParamAttrs && ParamAttrs->hasAttrSomewhere(ParamAttr::ByVal))
|
||||
return true;
|
||||
// Be consistent with other methods and check the callee too.
|
||||
if (const Function *F = getCalledFunction())
|
||||
if (const ParamAttrsList *PAL = F->getParamAttrs())
|
||||
return PAL->hasAttrSomewhere(ParamAttr::ByVal);
|
||||
return false;
|
||||
}
|
||||
|
||||
void CallInst::setDoesNotThrow(bool doesNotThrow) {
|
||||
|
Loading…
Reference in New Issue
Block a user