From 87e10dfefa94f77937c37b0eb51095540d675cbc Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Mon, 28 Jan 2013 21:55:20 +0000 Subject: 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 --- include/llvm/IR/Attributes.h | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) (limited to 'include') diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index e6de2bf..46a4444 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -177,22 +177,7 @@ template<> struct DenseMapInfo { 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 Attrs); + /// \brief Create an AttributeSet with the specified parameters in it. + static AttributeSet get(LLVMContext &C, + ArrayRef > Attrs); + static AttributeSet get(LLVMContext &C, + ArrayRef > Attrs); + + static AttributeSet getImpl(LLVMContext &C, + ArrayRef > Attrs); + explicit AttributeSet(AttributeSetImpl *LI) : pImpl(LI) {} public: -- cgit v1.1