diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-09-26 23:38:00 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-09-26 23:38:00 +0000 |
commit | 76b65ea9427e7dacef86bfa74b2efe2dd2178f9c (patch) | |
tree | 2e1b56f712e9082a60c4671ac0d511063bee6702 /llvm | |
parent | 2099bbb24bd1c4f2fad94dbc4dfe7327abf1cd09 (diff) | |
download | bcm5719-llvm-76b65ea9427e7dacef86bfa74b2efe2dd2178f9c.tar.gz bcm5719-llvm-76b65ea9427e7dacef86bfa74b2efe2dd2178f9c.zip |
Buildbot Fix.
This method can be called with a '0' argument which checks the return
value. However, the method it calls doesn't expect '0' as a valid value. Call the
correct method when it's 0.
llvm-svn: 164735
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Function.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/include/llvm/Function.h b/llvm/include/llvm/Function.h index 907b14f599f..fa6d0d3f5b2 100644 --- a/llvm/include/llvm/Function.h +++ b/llvm/include/llvm/Function.h @@ -278,7 +278,8 @@ public: /// @brief Determine if the parameter does not alias other parameters. /// @param n The parameter to check. 1 is the first parameter, 0 is the return bool doesNotAlias(unsigned n) const { - return getParamAttributes(n).hasNoAliasAttr(); + return n != 0 ? getParamAttributes(n).hasNoAliasAttr() : + AttributeList.getRetAttributes().hasNoAliasAttr(); } void setDoesNotAlias(unsigned n, bool DoesNotAlias = true) { if (DoesNotAlias) addAttribute(n, Attribute::NoAlias); |