Make the AttrBuilder creation method of Attribute private so that people won't use it.
[oota-llvm.git] / lib / IR / Verifier.cpp
index 5da74481e4f8287be1558e8368828decd13494f5..babc295126e82315c8d686754474b5b06393426b 100644 (file)
@@ -745,7 +745,9 @@ void Verifier::VerifyFunctionAttrs(FunctionType *FT,
   AttrBuilder NotFn(Attrs, AttributeSet::FunctionIndex);
   NotFn.removeFunctionOnlyAttrs();
   Assert1(!NotFn.hasAttributes(), "Attribute '" +
-          Attribute::get(V->getContext(), NotFn).getAsString() +
+          AttributeSet::get(V->getContext(),
+                            AttributeSet::FunctionIndex,
+                            NotFn).getAsString(AttributeSet::FunctionIndex) +
           "' do not apply to the function!", V);
 
   // Check for mutually incompatible attributes.