We want a string representation of the attribute, not the kind as a string.
authorBill Wendling <isanbard@gmail.com>
Tue, 18 Jun 2013 21:27:00 +0000 (21:27 +0000)
committerBill Wendling <isanbard@gmail.com>
Tue, 18 Jun 2013 21:27:00 +0000 (21:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184239 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/Verifier.cpp

index f8774bc3d9d8a96b759f6049a8f7cfb2b820633e..df28cee03e2100f364675eb0436521125648bdab 100644 (file)
@@ -695,11 +695,11 @@ void Verifier::VerifyAttributeTypes(AttributeSet Attrs, unsigned Idx,
         I->getKindAsEnum() == Attribute::NoBuiltin ||
         I->getKindAsEnum() == Attribute::Cold) {
       if (!isFunction)
-          CheckFailed("Attribute '" + I->getKindAsString() +
+          CheckFailed("Attribute '" + I->getAsString() +
                       "' only applies to functions!", V);
           return;
     } else if (isFunction) {
-        CheckFailed("Attribute '" + I->getKindAsString() +
+        CheckFailed("Attribute '" + I->getAsString() +
                     "' does not apply to functions!", V);
         return;
     }