[llvm] r250643 - Use array_lengthof. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 17 22:15:38 PDT 2015


Author: ctopper
Date: Sun Oct 18 00:15:38 2015
New Revision: 250643

URL: http://llvm.org/viewvc/llvm-project?rev=250643&view=rev
Log:
Use array_lengthof. NFC

Modified:
    llvm/trunk/lib/Support/CrashRecoveryContext.cpp

Modified: llvm/trunk/lib/Support/CrashRecoveryContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CrashRecoveryContext.cpp?rev=250643&r1=250642&r2=250643&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CrashRecoveryContext.cpp (original)
+++ llvm/trunk/lib/Support/CrashRecoveryContext.cpp Sun Oct 18 00:15:38 2015
@@ -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) {




More information about the llvm-commits mailing list