Change typeIncompatible to return an AttrBuilder instead of new-ing an AttributeSet.
[oota-llvm.git] / lib / IR / Verifier.cpp
index 16f343aee563d0e80dd0a28acb4685262a92fe25..1a30d5b5448bb1616dab037568e1f51799c9c58c 100644 (file)
@@ -1350,9 +1350,10 @@ void Verifier::VerifyParameterAttrs(AttributeSet Attrs, unsigned Idx, Type *Ty,
          V);
 
   Assert(!AttrBuilder(Attrs, Idx)
-              .hasAttributes(AttributeFuncs::typeIncompatible(Ty, Idx), Idx),
+              .overlaps(AttributeFuncs::typeIncompatible(Ty)),
          "Wrong types for attribute: " +
-             AttributeFuncs::typeIncompatible(Ty, Idx).getAsString(Idx),
+         AttributeSet::get(*Context, Idx,
+                        AttributeFuncs::typeIncompatible(Ty)).getAsString(Idx),
          V);
 
   if (PointerType *PTy = dyn_cast<PointerType>(Ty)) {