And now we can call the other 'get' method from this one and not duplicate the code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166037 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-10-16 18:20:09 +00:00
parent bedcbd433d
commit 79b319d355

View File

@ -290,10 +290,7 @@ struct AttributeWithIndex {
static AttributeWithIndex get(LLVMContext &C, unsigned Idx,
ArrayRef<Attributes::AttrVal> Attrs) {
AttributeWithIndex P;
P.Index = Idx;
P.Attrs = Attributes::get(C, Attrs);
return P;
return get(Idx, Attributes::get(C, Attrs));
}
static AttributeWithIndex get(unsigned Idx, Attributes Attrs) {
AttributeWithIndex P;
@ -318,8 +315,8 @@ public:
FunctionIndex = ~0U
};
private:
/// AttrList - The attributes that we are managing. This can be null
/// to represent the empty attributes list.
/// AttrList - The attributes that we are managing. This can be null to
/// represent the empty attributes list.
AttributeListImpl *AttrList;
public:
AttrListPtr() : AttrList(0) {}