summaryrefslogtreecommitdiff
path: root/include/llvm/IR/Function.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-08-07 23:01:33 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-08-07 23:01:33 +0000
commitee8648bdac07986a0f1ec897b02ec82a2f144d46 (patch)
tree52d1861acda1205241ee35a94aa63129c604d469 /include/llvm/IR/Function.h
parent1a82d4c088707c791c792f6822f611b47a12bdfe (diff)
Diffstat (limited to 'include/llvm/IR/Function.h')
-rw-r--r--include/llvm/IR/Function.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h
index 02ea056de39b4..ec9f4cad094ad 100644
--- a/include/llvm/IR/Function.h
+++ b/include/llvm/IR/Function.h
@@ -293,6 +293,16 @@ public:
addFnAttr(Attribute::ReadOnly);
}
+ /// @brief Determine if the call can access memmory only using pointers based
+ /// on its arguments.
+ bool onlyAccessesArgMemory() const {
+ return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,
+ Attribute::ArgMemOnly);
+ }
+ void setOnlyAccessesArgMemory() {
+ addFnAttr(Attribute::ArgMemOnly);
+ }
+
/// @brief Determine if the function cannot return.
bool doesNotReturn() const {
return AttributeSets.hasAttribute(AttributeSet::FunctionIndex,