aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit49bc76cbb3072c077f684e93904df8bb46803210 (patch)
treea3a33d3d9c71bc02a6b9c69506a9904e0eba2b71 /llvm/lib/IR/Function.cpp
parentc77c8e95e3f3a3f9161da179abf4b59f5dc78e74 (diff)
downloadllvm-49bc76cbb3072c077f684e93904df8bb46803210.zip
llvm-49bc76cbb3072c077f684e93904df8bb46803210.tar.gz
llvm-49bc76cbb3072c077f684e93904df8bb46803210.tar.bz2
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. llvm-svn: 173228
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index f2f3ec9..839e496 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/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
//===----------------------------------------------------------------------===//