summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/ParameterAttributes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/ParameterAttributes.cpp')
-rw-r--r--llvm/lib/VMCore/ParameterAttributes.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/ParameterAttributes.cpp b/llvm/lib/VMCore/ParameterAttributes.cpp
index b48e0cecde3..4b63cfb2da7 100644
--- a/llvm/lib/VMCore/ParameterAttributes.cpp
+++ b/llvm/lib/VMCore/ParameterAttributes.cpp
@@ -36,6 +36,13 @@ ParamAttrsList::getParamAttrs(uint16_t Index) const {
return ParamAttr::None;
}
+bool ParamAttrsList::hasAttrSomewhere(ParameterAttributes attr) const {
+ for (unsigned i = 0, e = attrs.size(); i < e; ++i)
+ if (attrs[i].attrs & attr)
+ return true;
+ return false;
+}
+
std::string
ParamAttrsList::getParamAttrsText(uint16_t Attrs) {
std::string Result;
OpenPOWER on IntegriCloud