From 8265e6ab4fb5ff178266d960c5d894f5828bb8ce Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Fri, 6 May 2011 19:50:10 +0000 Subject: [PATCH] Use array_lengthof. No functional change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131008 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c6be223e62d..f510fb5f890 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -225,10 +225,8 @@ static bool FunctionCallsSetJmp(const Function *F) { "vfork", "getcontext" }; - static const size_t NumReturnsTwiceFns = sizeof(ReturnsTwiceFns) / - sizeof(const char *); - for (unsigned I = 0; I < NumReturnsTwiceFns; ++I) + for (unsigned I = 0; I < array_lengthof(ReturnsTwiceFns); ++I) if (const Function *Callee = M->getFunction(ReturnsTwiceFns[I])) { if (!Callee->use_empty()) for (Value::const_use_iterator