[llvm-commits] [llvm] r48666 - /llvm/trunk/lib/System/Unix/Signals.inc
Dan Gohman
gohman at apple.com
Fri Mar 21 16:44:22 PDT 2008
Author: djg
Date: Fri Mar 21 18:44:21 2008
New Revision: 48666
URL: http://llvm.org/viewvc/llvm-project?rev=48666&view=rev
Log:
Avoid calling array_endof in a static initializer, as it incurs
dynamic initialization.
Modified:
llvm/trunk/lib/System/Unix/Signals.inc
Modified: llvm/trunk/lib/System/Unix/Signals.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Signals.inc?rev=48666&r1=48665&r2=48666&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Signals.inc (original)
+++ llvm/trunk/lib/System/Unix/Signals.inc Fri Mar 21 18:44:21 2008
@@ -41,7 +41,7 @@
const int IntSigs[] = {
SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGTERM, SIGUSR1, SIGUSR2
};
-const int *IntSigsEnd = array_endof(IntSigs);
+const int *IntSigsEnd = IntSigs + sizeof(IntSigs) / sizeof(IntSigs[0]);
// KillSigs - Signals that are synchronous with the program that will cause it
// to die.
@@ -51,7 +51,7 @@
, SIGEMT
#endif
};
-const int *KillSigsEnd = array_endof(KillSigs);
+const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]);
#ifdef HAVE_BACKTRACE
void* StackTrace[256];
More information about the llvm-commits
mailing list