From: Craig Topper Date: Sun, 18 Oct 2015 05:15:38 +0000 (+0000) Subject: Use array_lengthof. NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;ds=inline;h=bb2c212cf6abb138a4dd9220fb755e9309764327;p=oota-llvm.git Use array_lengthof. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250643 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/CrashRecoveryContext.cpp b/lib/Support/CrashRecoveryContext.cpp index 352b519f9b4..3f4ef9da48f 100644 --- a/lib/Support/CrashRecoveryContext.cpp +++ b/lib/Support/CrashRecoveryContext.cpp @@ -244,7 +244,7 @@ void CrashRecoveryContext::Disable() { static const int Signals[] = { SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV, SIGTRAP }; -static const unsigned NumSignals = sizeof(Signals) / sizeof(Signals[0]); +static const unsigned NumSignals = array_lengthof(Signals); static struct sigaction PrevActions[NumSignals]; static void CrashRecoverySignalHandler(int Signal) {