From 59243009860e016c449ac3471aed0eeb787a732e Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Wed, 14 Nov 2007 21:58:02 +0000 Subject: [PATCH] I discover array_lengthof, thanks to gabor on #llvm. llvm-svn: 44139 --- lib/VMCore/Verifier.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index c5387c61c17..5af9216fb42 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -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);