diff options
| author | Bill Wendling <isanbard@gmail.com> | 2012-10-09 19:01:18 +0000 |
|---|---|---|
| committer | Bill Wendling <isanbard@gmail.com> | 2012-10-09 19:01:18 +0000 |
| commit | 7c04e04a75c009a13e9fa19d33e3405162e9e37c (patch) | |
| tree | 570e6c254127024564e6a45b08000fc3961e3e4f /llvm/lib/VMCore/Verifier.cpp | |
| parent | aa4ca653ae8c3781f8d7def3c00cb35bd988614c (diff) | |
| download | bcm5719-llvm-7c04e04a75c009a13e9fa19d33e3405162e9e37c.tar.gz bcm5719-llvm-7c04e04a75c009a13e9fa19d33e3405162e9e37c.zip | |
Move the 'FunctionOnly' attributes thingy inside of the Attributes class.
llvm-svn: 165530
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
| -rw-r--r-- | llvm/lib/VMCore/Verifier.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp index 8b47f2518b9..5d389a86ed4 100644 --- a/llvm/lib/VMCore/Verifier.cpp +++ b/llvm/lib/VMCore/Verifier.cpp @@ -529,9 +529,9 @@ void Verifier::VerifyParameterAttrs(Attributes Attrs, Type *Ty, if (!Attrs.hasAttributes()) return; - Attributes FnCheckAttr = Attrs & Attribute::FunctionOnly; - Assert1(!FnCheckAttr, "Attribute " + FnCheckAttr.getAsString() + - " only applies to the function!", V); + Assert1(!Attrs.hasFunctionOnlyAttrs(), + "Some attributes in '" + Attrs.getAsString() + + "' only apply to functions!", V); if (isReturnValue) Assert1(!Attrs.hasParameterOnlyAttrs(), @@ -541,8 +541,8 @@ void Verifier::VerifyParameterAttrs(Attributes Attrs, Type *Ty, for (unsigned i = 0; i < array_lengthof(Attribute::MutuallyIncompatible); ++i) { Attributes MutI = Attrs & Attribute::MutuallyIncompatible[i]; - Assert1(MutI.isEmptyOrSingleton(), "Attributes " + - MutI.getAsString() + " are incompatible!", V); + Assert1(MutI.isEmptyOrSingleton(), "Attributes '" + + MutI.getAsString() + "' are incompatible!", V); } Attributes TypeI = Attrs & Attributes::typeIncompatible(Ty); @@ -592,9 +592,11 @@ void Verifier::VerifyFunctionAttrs(FunctionType *FT, } Attributes FAttrs = Attrs.getFnAttributes(); - Attributes NotFn = FAttrs & (~Attribute::FunctionOnly); - Assert1(!NotFn, "Attribute " + NotFn.getAsString() + - " does not apply to the function!", V); + Attributes::Builder NotFn(FAttrs); + NotFn.removeFunctionOnlyAttrs(); + Assert1(!NotFn.hasAttributes(), "Attributes '" + + Attributes::get(NotFn).getAsString() + + "' do not apply to the function!", V); for (unsigned i = 0; i < array_lengthof(Attribute::MutuallyIncompatible); ++i) { |

