aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/CallSite.h
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-09 21:38:14 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-09 21:38:14 +0000
commit3e2d76c946ba753c2b11af192a52e25b6f9b46ff (patch)
tree5486e6c9eeb14e5a5ac48625df20fb18182ba5eb /include/llvm/Support/CallSite.h
parent9ef99c96da5882f18daa67132f511a32cc26f2d8 (diff)
downloadexternal_llvm-3e2d76c946ba753c2b11af192a52e25b6f9b46ff.zip
external_llvm-3e2d76c946ba753c2b11af192a52e25b6f9b46ff.tar.gz
external_llvm-3e2d76c946ba753c2b11af192a52e25b6f9b46ff.tar.bz2
Use the attribute enums to query if a parameter has an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165550 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/CallSite.h')
-rw-r--r--include/llvm/Support/CallSite.h36
1 files changed, 5 insertions, 31 deletions
diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h
index bbbec6d..c15326e 100644
--- a/include/llvm/Support/CallSite.h
+++ b/include/llvm/Support/CallSite.h
@@ -210,35 +210,9 @@ public:
CALLSITE_DELEGATE_GETTER(hasFnAttr(N));
}
- /// paramHas*Attr - whether the call or the callee has the given attribute.
- bool paramHasSExtAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasSExtAttr(i));
- }
- bool paramHasZExtAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasZExtAttr(i));
- }
- bool paramHasInRegAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasInRegAttr(i));
- }
- bool paramHasStructRetAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasStructRetAttr(i));
- }
- bool paramHasNestAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasNestAttr(i));
- }
- bool paramHasByValAttr(unsigned i) const {
- CALLSITE_DELEGATE_GETTER(paramHasByValAttr(i));
- }
- 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 {
- CALLSITE_DELEGATE_GETTER(paramHasAttr(i, attr));
+ /// \brief Return true if the call or the callee has the given attribute.
+ bool paramHasAttr(unsigned i, Attributes::AttrVal A) const {
+ CALLSITE_DELEGATE_GETTER(paramHasAttr(i, A));
}
/// @brief Extract the alignment for a call or parameter (0=unknown).
@@ -291,12 +265,12 @@ public:
/// @brief Determine whether this argument is not captured.
bool doesNotCapture(unsigned ArgNo) const {
- return paramHasNoCaptureAttr(ArgNo + 1);
+ return paramHasAttr(ArgNo + 1, Attributes::NoCapture);
}
/// @brief Determine whether this argument is passed by value.
bool isByValArgument(unsigned ArgNo) const {
- return paramHasByValAttr(ArgNo + 1);
+ return paramHasAttr(ArgNo + 1, Attributes::ByVal);
}
/// hasArgument - Returns true if this CallSite passes the given Value* as an