[llvm-commits] [llvm] r166037 - /llvm/trunk/include/llvm/Attributes.h

Bill Wendling isanbard at gmail.com
Tue Oct 16 11:20:09 PDT 2012


Author: void
Date: Tue Oct 16 13:20:09 2012
New Revision: 166037

URL: http://llvm.org/viewvc/llvm-project?rev=166037&view=rev
Log:
And now we can call the other 'get' method from this one and not duplicate the code.

Modified:
    llvm/trunk/include/llvm/Attributes.h

Modified: llvm/trunk/include/llvm/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Attributes.h?rev=166037&r1=166036&r2=166037&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Attributes.h (original)
+++ llvm/trunk/include/llvm/Attributes.h Tue Oct 16 13:20:09 2012
@@ -290,10 +290,7 @@
 
   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 @@
     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) {}





More information about the llvm-commits mailing list