diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:14:59 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-01-23 06:14:59 +0000 |
commit | 28d65722d6f283b327b5815914382077fe9c0ab4 (patch) | |
tree | 2edfbefbb4ed020a14b308718f9ccecebfaa0c6b /lib/IR/Attributes.cpp | |
parent | d3afa9be99e504350582f08ffc4cd05cf928db6a (diff) | |
download | external_llvm-28d65722d6f283b327b5815914382077fe9c0ab4.zip external_llvm-28d65722d6f283b327b5815914382077fe9c0ab4.tar.gz external_llvm-28d65722d6f283b327b5815914382077fe9c0ab4.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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/IR/Attributes.cpp')
-rw-r--r-- | lib/IR/Attributes.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index a3abd36..4bd2391 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -541,6 +541,14 @@ AttributeWithIndex AttributeWithIndex::get(LLVMContext &C, unsigned Idx, // AttributeSetImpl Definition //===----------------------------------------------------------------------===// +AttributeSet AttributeSet::getParamAttributes(unsigned Idx) const { + // FIXME: Remove. + return AttrList && hasAttributes(Idx) ? + AttributeSet::get(AttrList->getContext(), + AttributeWithIndex::get(Idx, getAttributes(Idx))) : + AttributeSet(); +} + AttributeSet AttributeSet::getRetAttributes() const { // FIXME: Remove. return AttrList && hasAttributes(ReturnIndex) ? @@ -601,6 +609,11 @@ AttributeSet AttributeSet::get(LLVMContext &C, unsigned Idx, AttrBuilder &B) { return get(C, AttributeWithIndex::get(Idx, Attribute::get(C, B))); } +AttributeSet AttributeSet::get(LLVMContext &C, unsigned Idx, + Attribute::AttrKind Kind) { + return get(C, AttributeWithIndex::get(Idx, Attribute::get(C, Kind))); +} + //===----------------------------------------------------------------------===// // AttributeSet Method Implementations //===----------------------------------------------------------------------===// |