aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/Attributes.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-18 21:53:16 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-18 21:53:16 +0000
commit1b0c54f1c5dd61e56cb7cbc435fcb3319cff628f (patch)
treefc692786464bca45139569b988cd5ada7399dfc9 /lib/IR/Attributes.cpp
parent1a17bd21ff64968817dedb6cd2b7c809cee90804 (diff)
Use AttributeSet accessor methods instead of Attribute accessor methods.
Further encapsulation of the Attribute object. Don't allow direct access to the Attribute object as an aggregate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172853 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r--lib/IR/Attributes.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp
index 173782e5a2..bb98358a0a 100644
--- a/lib/IR/Attributes.cpp
+++ b/lib/IR/Attributes.cpp
@@ -660,6 +660,11 @@ bool AttributeSet::hasAttrSomewhere(Attribute::AttrKind Attr) const {
return false;
}
+AttributeSet AttributeSet::addRetAttributes(LLVMContext &C,
+ AttributeSet Attrs) const {
+ return addAttr(C, ReturnIndex, getAttributes(ReturnIndex));
+}
+
AttributeSet AttributeSet::addFnAttributes(LLVMContext &C,
AttributeSet Attrs) const {
return addAttr(C, FunctionIndex, getAttributes(FunctionIndex));