summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Function.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-12-11 08:36:17 +0000
committerDuncan Sands <baldrick@free.fr>2009-12-11 08:36:17 +0000
commit5d96f3fcb68f89c6658c0c21659911eb3d44f28e (patch)
treeadea1fee1793f7aca05455d63a0fec7f385babe1 /llvm/lib/VMCore/Function.cpp
parent1762cf2ad0c18d8a236d833ef8e5579fb6b7eba5 (diff)
downloadbcm5719-llvm-5d96f3fcb68f89c6658c0c21659911eb3d44f28e.tar.gz
bcm5719-llvm-5d96f3fcb68f89c6658c0c21659911eb3d44f28e.zip
Add utility method for determining whether a function argument
has the 'nest' attribute. llvm-svn: 91109
Diffstat (limited to 'llvm/lib/VMCore/Function.cpp')
-rw-r--r--llvm/lib/VMCore/Function.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Function.cpp b/llvm/lib/VMCore/Function.cpp
index 6cf2c8186f9..88e1fe8ae4f 100644
--- a/llvm/lib/VMCore/Function.cpp
+++ b/llvm/lib/VMCore/Function.cpp
@@ -77,6 +77,13 @@ bool Argument::hasByValAttr() const {
return getParent()->paramHasAttr(getArgNo()+1, Attribute::ByVal);
}
+/// hasNestAttr - Return true if this argument has the nest attribute on
+/// it in its containing function.
+bool Argument::hasNestAttr() const {
+ if (!isa<PointerType>(getType())) return false;
+ return getParent()->paramHasAttr(getArgNo()+1, Attribute::Nest);
+}
+
/// hasNoAliasAttr - Return true if this argument has the noalias attribute on
/// it in its containing function.
bool Argument::hasNoAliasAttr() const {
OpenPOWER on IntegriCloud