diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-04 07:18:12 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-04 07:18:12 +0000 |
commit | 365b9e0668d44038fa0c2739060c26acae12066e (patch) | |
tree | 6b3fd6f398b51b17305dccf6bd4b00d7a6ae2698 /include/llvm/Support | |
parent | 1f9855a814fd61207d7fd4586d97c467fa85db1c (diff) | |
download | external_llvm-365b9e0668d44038fa0c2739060c26acae12066e.zip external_llvm-365b9e0668d44038fa0c2739060c26acae12066e.tar.gz external_llvm-365b9e0668d44038fa0c2739060c26acae12066e.tar.bz2 |
Add method to query for NoCapture attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165212 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support')
-rw-r--r-- | include/llvm/Support/CallSite.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 98c48d9..3c5a8d4 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -211,6 +211,9 @@ public: bool paramHasNoAliasAttr(unsigned i) const { CALLSITE_DELEGATE_GETTER(paramHasNoAliasAttr(i)); } + bool paramHasNoCaptureAttr(unsigned i) const { + CALLSITE_DELEGATE_GETTER(paramHasNoCaptureAttr(i)); + } /// paramHasAttr - whether the call or the callee has the given attribute. bool paramHasAttr(uint16_t i, Attributes attr) const { @@ -267,12 +270,12 @@ public: /// @brief Determine whether this argument is not captured. bool doesNotCapture(unsigned ArgNo) const { - return paramHasAttr(ArgNo + 1, Attribute::NoCapture); + return paramHasNoCaptureAttr(ArgNo + 1); } /// @brief Determine whether this argument is passed by value. bool isByValArgument(unsigned ArgNo) const { - return paramHasAttr(ArgNo + 1, Attribute::ByVal); + return paramHasByValAttr(ArgNo + 1); } /// hasArgument - Returns true if this CallSite passes the given Value* as an |