aboutsummaryrefslogtreecommitdiff
path: root/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-23 06:14:59 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-23 06:14:59 +0000
commit28d65722d6f283b327b5815914382077fe9c0ab4 (patch)
tree2edfbefbb4ed020a14b308718f9ccecebfaa0c6b /lib/IR/Function.cpp
parentd3afa9be99e504350582f08ffc4cd05cf928db6a (diff)
Remove the last of uses that use the Attribute object as a collection of attributes.
Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Function.cpp')
-rw-r--r--lib/IR/Function.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/IR/Function.cpp b/lib/IR/Function.cpp
index f2f3ec9aab..839e496f92 100644
--- a/lib/IR/Function.cpp
+++ b/lib/IR/Function.cpp
@@ -123,23 +123,16 @@ bool Argument::hasStructRetAttr() const {
hasAttribute(1, Attribute::StructRet);
}
-/// addAttr - Add a Attribute to an argument
-void Argument::addAttr(Attribute attr) {
- AttrBuilder B(attr);
- getParent()->addAttributes(getArgNo() + 1,
- AttributeSet::get(getParent()->getContext(),
- getArgNo() + 1, B));
+/// addAttr - Add attributes to an argument.
+void Argument::addAttr(AttributeSet AS) {
+ getParent()->addAttributes(getArgNo() + 1, AS);
}
-/// removeAttr - Remove a Attribute from an argument
-void Argument::removeAttr(Attribute attr) {
- AttrBuilder B(attr);
- getParent()->removeAttributes(getArgNo() + 1,
- AttributeSet::get(getParent()->getContext(),
- getArgNo() + 1, B));
+/// removeAttr - Remove attributes from an argument.
+void Argument::removeAttr(AttributeSet AS) {
+ getParent()->removeAttributes(getArgNo() + 1, AS);
}
-
//===----------------------------------------------------------------------===//
// Helper Methods in Function
//===----------------------------------------------------------------------===//