I discover array_lengthof, thanks to gabor on #llvm.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44139 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2007-11-14 21:58:02 +00:00
parent f04d584cae
commit c455ebeb0c

View File

@ -436,8 +436,7 @@ void Verifier::visitFunction(Function &F) {
}
for (unsigned i = 0; i * sizeof MutuallyIncompatible[0] <
sizeof MutuallyIncompatible; ++i) {
for (unsigned i = 0; i < array_lengthof(MutuallyIncompatible); ++i) {
uint16_t MutI = Attr & MutuallyIncompatible[i];
Assert1(!(MutI & (MutI - 1)), "Attributes " +
Attrs->getParamAttrsText(MutI) + "are incompatible!", &F);