summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2013-01-31 01:51:27 +0000
committerBill Wendling <isanbard@gmail.com>2013-01-31 01:51:27 +0000
commit37f7e18705f6ce4e41b343ec929f92a93cc65e21 (patch)
treef755bd034caa4c6face9286b403cb82ecb06bc5f /llvm
parentde5cc7d3d87eb654f11af27387279a3daf9d7382 (diff)
downloadbcm5719-llvm-37f7e18705f6ce4e41b343ec929f92a93cc65e21.tar.gz
bcm5719-llvm-37f7e18705f6ce4e41b343ec929f92a93cc65e21.zip
Make the AttrBuilder creation method of Attribute private so that people won't use it.
llvm-svn: 174023
Diffstat (limited to 'llvm')
-rw-r--r--llvm/include/llvm/IR/Attributes.h3
-rw-r--r--llvm/lib/IR/Verifier.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/Attributes.h b/llvm/include/llvm/IR/Attributes.h
index 29eaec1d0df..e854da7313e 100644
--- a/llvm/include/llvm/IR/Attributes.h
+++ b/llvm/include/llvm/IR/Attributes.h
@@ -105,6 +105,8 @@ public:
private:
AttributeImpl *pImpl;
Attribute(AttributeImpl *A) : pImpl(A) {}
+
+ static Attribute get(LLVMContext &Context, AttrBuilder &B);
public:
Attribute() : pImpl(0) {}
@@ -114,7 +116,6 @@ public:
/// \brief Return a uniquified Attribute object.
static Attribute get(LLVMContext &Context, AttrKind Kind);
- static Attribute get(LLVMContext &Context, AttrBuilder &B);
/// \brief Return a uniquified Attribute object that has the specific
/// alignment set.
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 5da74481e4f..babc295126e 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -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.
OpenPOWER on IntegriCloud