From 09dda440ba6622b64713ef5f7d9531411e3589ea Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sun, 27 Jan 2013 09:55:44 +0000 Subject: [PATCH] Remove dead methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173611 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/Attributes.h | 8 +------- lib/IR/Attributes.cpp | 18 ++---------------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/include/llvm/IR/Attributes.h b/include/llvm/IR/Attributes.h index 855743af5c1..431c59db354 100644 --- a/include/llvm/IR/Attributes.h +++ b/include/llvm/IR/Attributes.h @@ -109,7 +109,7 @@ public: /// \brief Return a uniquified Attribute object. This takes the uniquified /// value from the Builder and wraps it in the Attribute class. - static Attribute get(LLVMContext &Context, ArrayRef Vals); + static Attribute get(LLVMContext &Context, AttrKind Kind); static Attribute get(LLVMContext &Context, AttrBuilder &B); /// \brief Return true if the attribute is present. @@ -351,12 +351,6 @@ struct AttributeWithIndex { Attribute Attrs; ///< The attributes that are set, or'd together. unsigned Index; ///< Index of the parameter for which the attributes apply. - // FIXME: These methods all need to be revised. The first one is temporary. - static AttributeWithIndex get(LLVMContext &C, unsigned Idx, AttributeSet AS); - static AttributeWithIndex get(LLVMContext &C, unsigned Idx, - ArrayRef Attrs) { - return get(Idx, Attribute::get(C, Attrs)); - } static AttributeWithIndex get(unsigned Idx, Attribute Attrs) { AttributeWithIndex P; P.Index = Idx; diff --git a/lib/IR/Attributes.cpp b/lib/IR/Attributes.cpp index c033b5a005c..937514a0a4a 100644 --- a/lib/IR/Attributes.cpp +++ b/lib/IR/Attributes.cpp @@ -30,11 +30,8 @@ using namespace llvm; // Attribute Implementation //===----------------------------------------------------------------------===// -Attribute Attribute::get(LLVMContext &Context, ArrayRef Vals) { - AttrBuilder B; - for (ArrayRef::iterator I = Vals.begin(), E = Vals.end(); - I != E; ++I) - B.addAttribute(*I); +Attribute Attribute::get(LLVMContext &Context, AttrKind Kind) { + AttrBuilder B(Kind); return Attribute::get(Context, B); } @@ -486,17 +483,6 @@ void AttributeImpl::Profile(FoldingSetNodeID &ID, Constant *Data, #endif } -//===----------------------------------------------------------------------===// -// AttributeWithIndex Definition -//===----------------------------------------------------------------------===// - -AttributeWithIndex AttributeWithIndex::get(LLVMContext &C, unsigned Idx, - AttributeSet AS) { - // FIXME: This is temporary, but necessary for the conversion. - AttrBuilder B(AS, Idx); - return get(Idx, Attribute::get(C, B)); -} - //===----------------------------------------------------------------------===// // AttributeSetNode Definition //===----------------------------------------------------------------------===// -- 2.34.1