[llvm] r173962 - Use the number of 'slots' in the AttributeSetImpl being 0 to indicate that the AttributeSet is empty.

Bill Wendling isanbard at gmail.com
Wed Jan 30 11:39:21 PST 2013


Author: void
Date: Wed Jan 30 13:39:21 2013
New Revision: 173962

URL: http://llvm.org/viewvc/llvm-project?rev=173962&view=rev
Log:
Use the number of 'slots' in the AttributeSetImpl being 0 to indicate that the AttributeSet is empty.

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

Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=173962&r1=173961&r2=173962&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Wed Jan 30 13:39:21 2013
@@ -308,7 +308,7 @@ public:
 
   /// \brief Return true if there are no attributes.
   bool isEmpty() const {
-    return pImpl == 0;
+    return getNumSlots() == 0;
   }
 
   /// \brief Return the number of slots used in this attribute list.  This is





More information about the llvm-commits mailing list