diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-21 23:44:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-21 23:44:21 +0000 |
commit | 03548ebe7ffeedcb0e2ed5b5a96d201e2bbba15d (patch) | |
tree | 8c5955ab3ec52fce32b11518edfa97674d527a1d /lib/System/Unix | |
parent | 5bf51082ad699182d0333d5df42473a58f837507 (diff) | |
download | external_llvm-03548ebe7ffeedcb0e2ed5b5a96d201e2bbba15d.zip external_llvm-03548ebe7ffeedcb0e2ed5b5a96d201e2bbba15d.tar.gz external_llvm-03548ebe7ffeedcb0e2ed5b5a96d201e2bbba15d.tar.bz2 |
Avoid calling array_endof in a static initializer, as it incurs
dynamic initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48666 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix')
-rw-r--r-- | lib/System/Unix/Signals.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc index ff84639..f7149b1 100644 --- a/lib/System/Unix/Signals.inc +++ b/lib/System/Unix/Signals.inc @@ -41,7 +41,7 @@ std::vector<sys::Path> *DirectoriesToRemove = 0; 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 @@ const int KillSigs[] = { , SIGEMT #endif }; -const int *KillSigsEnd = array_endof(KillSigs); +const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]); #ifdef HAVE_BACKTRACE void* StackTrace[256]; |