summaryrefslogtreecommitdiff
path: root/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-09-20 14:44:42 +0000
committerBill Wendling <isanbard@gmail.com>2012-09-20 14:44:42 +0000
commit8ce1e432d1c942d101617b3c623970a4f763f93d (patch)
treefcdf2ec41ce4f7e27ab421aaa942fb479e2b2d2e /lib/VMCore/Verifier.cpp
parent6dfabb6cc72118e046d2a466aa6adcec4c4923db (diff)
downloadllvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.gz
llvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.bz2
llvm-8ce1e432d1c942d101617b3c623970a4f763f93d.tar.xz
Make the 'getAsString' function a method of the Attributes class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164305 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r--lib/VMCore/Verifier.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp
index 83c900add5..647a52fbdd 100644
--- a/lib/VMCore/Verifier.cpp
+++ b/lib/VMCore/Verifier.cpp
@@ -530,12 +530,12 @@ void Verifier::VerifyParameterAttrs(Attributes Attrs, Type *Ty,
return;
Attributes FnCheckAttr = Attrs & Attribute::FunctionOnly;
- Assert1(!FnCheckAttr, "Attribute " + Attribute::getAsString(FnCheckAttr) +
+ Assert1(!FnCheckAttr, "Attribute " + FnCheckAttr.getAsString() +
" only applies to the function!", V);
if (isReturnValue) {
Attributes RetI = Attrs & Attribute::ParameterOnly;
- Assert1(!RetI, "Attribute " + Attribute::getAsString(RetI) +
+ Assert1(!RetI, "Attribute " + RetI.getAsString() +
" does not apply to return values!", V);
}
@@ -543,21 +543,21 @@ void Verifier::VerifyParameterAttrs(Attributes Attrs, Type *Ty,
i < array_lengthof(Attribute::MutuallyIncompatible); ++i) {
Attributes MutI = Attrs & Attribute::MutuallyIncompatible[i];
Assert1(MutI.isEmptyOrSingleton(), "Attributes " +
- Attribute::getAsString(MutI) + " are incompatible!", V);
+ MutI.getAsString() + " are incompatible!", V);
}
Attributes TypeI = Attrs & Attribute::typeIncompatible(Ty);
Assert1(!TypeI, "Wrong type for attribute " +
- Attribute::getAsString(TypeI), V);
+ TypeI.getAsString(), V);
Attributes ByValI = Attrs & Attribute::ByVal;
if (PointerType *PTy = dyn_cast<PointerType>(Ty)) {
Assert1(!ByValI || PTy->getElementType()->isSized(),
- "Attribute " + Attribute::getAsString(ByValI) +
+ "Attribute " + ByValI.getAsString() +
" does not support unsized types!", V);
} else {
Assert1(!ByValI,
- "Attribute " + Attribute::getAsString(ByValI) +
+ "Attribute " + ByValI.getAsString() +
" only applies to parameters with pointer type!", V);
}
}
@@ -596,14 +596,14 @@ void Verifier::VerifyFunctionAttrs(FunctionType *FT,
Attributes FAttrs = Attrs.getFnAttributes();
Attributes NotFn = FAttrs & (~Attribute::FunctionOnly);
- Assert1(!NotFn, "Attribute " + Attribute::getAsString(NotFn) +
+ Assert1(!NotFn, "Attribute " + NotFn.getAsString() +
" does not apply to the function!", V);
for (unsigned i = 0;
i < array_lengthof(Attribute::MutuallyIncompatible); ++i) {
Attributes MutI = FAttrs & Attribute::MutuallyIncompatible[i];
Assert1(MutI.isEmptyOrSingleton(), "Attributes " +
- Attribute::getAsString(MutI) + " are incompatible!", V);
+ MutI.getAsString() + " are incompatible!", V);
}
}
@@ -1171,7 +1171,7 @@ void Verifier::VerifyCallSite(CallSite CS) {
VerifyParameterAttrs(Attr, CS.getArgument(Idx-1)->getType(), false, I);
Attributes VArgI = Attr & Attribute::VarArgsIncompatible;
- Assert1(!VArgI, "Attribute " + Attribute::getAsString(VArgI) +
+ Assert1(!VArgI, "Attribute " + VArgI.getAsString() +
" cannot be used for vararg call arguments!", I);
}