diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2013-07-07 08:29:51 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2013-07-07 08:29:51 +0000 |
commit | 6bd46a40e8258b4321a2c6f35a8c61b3fa22116c (patch) | |
tree | 98dc7a1e2f24d8c20c0a131c993c43652811feb3 | |
parent | 369cc938d261de3295eb70d0738f54ef1a82806c (diff) | |
download | llvm-6bd46a40e8258b4321a2c6f35a8c61b3fa22116c.tar.gz llvm-6bd46a40e8258b4321a2c6f35a8c61b3fa22116c.tar.bz2 llvm-6bd46a40e8258b4321a2c6f35a8c61b3fa22116c.tar.xz |
Add missing per-argument doesNotAccessMemory accessors. No functionality change
since it has no callers today.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185775 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/IR/Function.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/IR/Function.h b/include/llvm/IR/Function.h index cfb862d9b0..455469d1fa 100644 --- a/include/llvm/IR/Function.h +++ b/include/llvm/IR/Function.h @@ -310,9 +310,16 @@ public: addAttribute(n, Attribute::NoCapture); } + bool doesNotAccessMemory(unsigned n) const { + return AttributeSets.hasAttribute(n, Attribute::ReadNone); + } + void setDoesNotAccessMemory(unsigned n) { + addAttribute(n, Attribute::ReadNone); + } + bool onlyReadsMemory(unsigned n) const { - return AttributeSets.hasAttribute(n, Attribute::ReadOnly) || - AttributeSets.hasAttribute(n, Attribute::ReadNone); + return doesNotAccessMemory(n) || + AttributeSets.hasAttribute(n, Attribute::ReadOnly); } void setOnlyReadsMemory(unsigned n) { addAttribute(n, Attribute::ReadOnly); |