aboutsummaryrefslogtreecommitdiff
path: root/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/VMCore/Function.cpp')
-rw-r--r--lib/VMCore/Function.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp
index 47e85d7aa6..fe3f2fe770 100644
--- a/lib/VMCore/Function.cpp
+++ b/lib/VMCore/Function.cpp
@@ -103,6 +103,13 @@ bool Argument::hasNoAliasAttr() const {
return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::NoAlias);
}
+/// hasSRetAttr - Return true if this argument has the sret attribute on
+/// it in its containing function.
+bool Argument::hasStructRetAttr() const {
+ if (!isa<PointerType>(getType())) return false;
+ return getParent()->paramHasAttr(getArgNo()+1, ParamAttr::StructRet);
+}
+