[X86] Adding support for FWORD type for MS inline asm
[oota-llvm.git] / lib / Support / CrashRecoveryContext.cpp
index b9829e1192a13f2f276b10c717c4c4b0064f8ab4..3f4ef9da48f17c8995523b31fdae8834164ad6c5 100644 (file)
@@ -24,6 +24,10 @@ static ManagedStatic<
     sys::ThreadLocal<const CrashRecoveryContextImpl> > CurrentContext;
 
 struct CrashRecoveryContextImpl {
+  // When threads are disabled, this links up all active
+  // CrashRecoveryContextImpls.  When threads are enabled there's one thread
+  // per CrashRecoveryContext and CurrentContext is a thread-local, so only one
+  // CrashRecoveryContextImpl is active per thread and this is always null.
   const CrashRecoveryContextImpl *Next;
 
   CrashRecoveryContext *CRC;
@@ -240,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) {