Use array_lengthof. NFC
authorCraig Topper <craig.topper@gmail.com>
Sun, 18 Oct 2015 05:15:38 +0000 (05:15 +0000)
committerCraig Topper <craig.topper@gmail.com>
Sun, 18 Oct 2015 05:15:38 +0000 (05:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250643 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/CrashRecoveryContext.cpp

index 352b519f9b4051450e13da738497f375ef2cbf6f..3f4ef9da48f17c8995523b31fdae8834164ad6c5 100644 (file)
@@ -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) {