Attempt to fix dragonegg. Use the number of slots to determine if the AttributeSet...
authorBill Wendling <isanbard@gmail.com>
Wed, 30 Jan 2013 06:54:41 +0000 (06:54 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 30 Jan 2013 06:54:41 +0000 (06:54 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173902 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Verifier.cpp

index 39f95fa772d25c4a27330972726f8f3eaad3e4a4..2d69493ecef08ce39e251bc5b35995115d9e9362 100644 (file)
@@ -797,7 +797,7 @@ void Verifier::VerifyFunctionAttrs(FunctionType *FT,
 }
 
 static bool VerifyAttributeCount(const AttributeSet &Attrs, unsigned Params) {
-  if (Attrs.isEmpty())
+  if (Attrs.getNumSlots() == 0)
     return true;
 
   unsigned LastSlot = Attrs.getNumSlots() - 1;