diff options
| author | Bill Wendling <isanbard@gmail.com> | 2013-01-22 00:53:12 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2013-01-22 00:53:12 +0000 |
| commit | e4e85f17564c28cd571dda30146c3f310521acf0 (patch) | |
| tree | 83651d7a60f4eda42be43032a4488e434ba0a01d /include | |
| parent | da6d5623aefeb3c77a610954c77605107e1532b8 (diff) | |
Add a new method that adds the AttributeSet at the given index. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
| -rw-r--r-- | include/llvm/IR/Attributes.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index ef80b4d463..c1146612cd 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -231,13 +231,22 @@ public: /// list. AttributeSet addAttr(LLVMContext &C, unsigned Idx, Attribute Attrs) const; + /// \brief Add attributes to the attribute set at the given index. Since + /// attribute sets are immutable, this returns a new set. + AttributeSet addAttributes(LLVMContext &C, unsigned Idx, + AttributeSet Attrs) const; + /// \brief Add return attributes to this attribute set. Since attribute sets /// are immutable, this returns a new set. - AttributeSet addRetAttributes(LLVMContext &C, AttributeSet Attrs) const; + AttributeSet addRetAttributes(LLVMContext &C, AttributeSet Attrs) const { + return addAttributes(C, ReturnIndex, Attrs); + } /// \brief Add function attributes to this attribute set. Since attribute sets /// are immutable, this returns a new set. - AttributeSet addFnAttributes(LLVMContext &C, AttributeSet Attrs) const; + AttributeSet addFnAttributes(LLVMContext &C, AttributeSet Attrs) const { + return addAttributes(C, FunctionIndex, Attrs); + } /// \brief Remove the specified attribute at the specified index from this /// attribute list. Since attribute lists are immutable, this returns the new |
