And now we can call the other 'get' method from this one and not duplicate the code.
authorBill Wendling <isanbard@gmail.com>
Tue, 16 Oct 2012 18:20:09 +0000 (18:20 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 16 Oct 2012 18:20:09 +0000 (18:20 +0000)
llvm-svn: 166037

llvm/include/llvm/Attributes.h

index 4222a62..1e995f9 100644 (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) {}