mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 19:52:54 +01:00
Be consistent with other attribute methods, and
check the callee also if it is known. llvm-svn: 46206
This commit is contained in:
parent
3f3215cb52
commit
26de25066c
@ -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