[llvm] r174023 - Make the AttrBuilder creation method of Attribute private so that people won't use it.
Bill Wendling
isanbard at gmail.com
Wed Jan 30 17:51:28 PST 2013
Author: void
Date: Wed Jan 30 19:51:27 2013
New Revision: 174023
URL: http://llvm.org/viewvc/llvm-project?rev=174023&view=rev
Log:
Make the AttrBuilder creation method of Attribute private so that people won't use it.
Modified:
llvm/trunk/include/llvm/IR/Attributes.h
llvm/trunk/lib/IR/Verifier.cpp
Modified: llvm/trunk/include/llvm/IR/Attributes.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/Attributes.h?rev=174023&r1=174022&r2=174023&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/Attributes.h (original)
+++ llvm/trunk/include/llvm/IR/Attributes.h Wed Jan 30 19:51:27 2013
@@ -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.
Modified: llvm/trunk/lib/IR/Verifier.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/Verifier.cpp?rev=174023&r1=174022&r2=174023&view=diff
==============================================================================
--- llvm/trunk/lib/IR/Verifier.cpp (original)
+++ llvm/trunk/lib/IR/Verifier.cpp Wed Jan 30 19:51:27 2013
@@ -745,7 +745,9 @@ void Verifier::VerifyFunctionAttrs(Funct
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.
More information about the llvm-commits
mailing list