summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-28 21:55:20 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-28 21:55:20 +0000
commit87e10dfefa94f77937c37b0eb51095540d675cbc (patch)
treefb23af640a619069bb117ebf009c1803bb97289d /include
parentc4e441804ebe5a2d0eadbd9b0840d4f1b12d5a6f (diff)
downloadllvm-87e10dfefa94f77937c37b0eb51095540d675cbc.tar.gz
llvm-87e10dfefa94f77937c37b0eb51095540d675cbc.tar.bz2
llvm-87e10dfefa94f77937c37b0eb51095540d675cbc.tar.xz
Remove the AttributeWithIndex class.
The AttributeWithIndex class exposed the interior structure of the AttributeSet class. That was gross. Remove it and all of the code that relied upon it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/IR/Attributes.h31
1 files changed, 12 insertions, 19 deletions
diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h
index e6de2bf50b..46a4444e8c 100644
--- a/include/llvm/IR/Attributes.h
+++ b/include/llvm/IR/Attributes.h
@@ -177,22 +177,7 @@ template<> struct DenseMapInfo<Attribute::AttrKind> {
class AttrBuilder;
class AttributeSetImpl;
-
-//===----------------------------------------------------------------------===//
-/// \class
-/// \brief This is just a pair of values to associate a set of attributes with
-/// an index.
-struct AttributeWithIndex {
- Attribute Attrs; ///< The attributes that are set, or'd together.
- unsigned Index; ///< Index of the parameter for which the attributes apply.
-
- static AttributeWithIndex get(unsigned Idx, Attribute Attrs) {
- AttributeWithIndex P;
- P.Index = Idx;
- P.Attrs = Attrs;
- return P;
- }
-};
+class AttributeSetNode;
//===----------------------------------------------------------------------===//
/// \class
@@ -216,9 +201,17 @@ private:
/// for the result are denoted with Idx = 0.
Attribute getAttributes(unsigned Idx) const;
- /// \brief Create an AttributeSet from the AttributeWithIndex structures.
- /// N.B. this is only temporary. It will be disappearing in the future.
- static AttributeSet get(LLVMContext &C, ArrayRef<AttributeWithIndex> Attrs);
+ /// \brief Create an AttributeSet with the specified parameters in it.
+ static AttributeSet get(LLVMContext &C,
+ ArrayRef<std::pair<uint64_t, Attribute> > Attrs);
+ static AttributeSet get(LLVMContext &C,
+ ArrayRef<std::pair<uint64_t,
+ AttributeSetNode*> > Attrs);
+
+ static AttributeSet getImpl(LLVMContext &C,
+ ArrayRef<std::pair<uint64_t,
+ AttributeSetNode*> > Attrs);
+
explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {}
public: