aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-10 21:11:47 +0000
committerDan Gohman <gohman@apple.com>2008-04-10 21:11:47 +0000
commit3bd659ba20c235caabb0df6f93888d898197afb0 (patch)
treee1558617e3cb2e7bac20807d0c6a9d3fa4d5a88f /lib/System
parenteee962e1cebb1b70ccd3f5d35f3a5a8c9ba942b5 (diff)
downloadexternal_llvm-3bd659ba20c235caabb0df6f93888d898197afb0.zip
external_llvm-3bd659ba20c235caabb0df6f93888d898197afb0.tar.gz
external_llvm-3bd659ba20c235caabb0df6f93888d898197afb0.tar.bz2
Make several symbols static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49496 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Unix/Signals.inc24
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc
index f7149b1..3314a43 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/System/Unix/Signals.inc
@@ -29,32 +29,32 @@ using namespace llvm;
namespace {
-bool StackTraceRequested = false;
+static bool StackTraceRequested = false;
/// InterruptFunction - The function to call if ctrl-c is pressed.
-void (*InterruptFunction)() = 0;
+static void (*InterruptFunction)() = 0;
-std::vector<sys::Path> *FilesToRemove = 0 ;
-std::vector<sys::Path> *DirectoriesToRemove = 0;
+static std::vector<sys::Path> *FilesToRemove = 0 ;
+static std::vector<sys::Path> *DirectoriesToRemove = 0;
// IntSigs - Signals that may interrupt the program at any time.
-const int IntSigs[] = {
+static const int IntSigs[] = {
SIGHUP, SIGINT, SIGQUIT, SIGPIPE, SIGTERM, SIGUSR1, SIGUSR2
};
-const int *IntSigsEnd = IntSigs + sizeof(IntSigs) / sizeof(IntSigs[0]);
+static const int *IntSigsEnd = IntSigs + sizeof(IntSigs) / sizeof(IntSigs[0]);
// KillSigs - Signals that are synchronous with the program that will cause it
// to die.
-const int KillSigs[] = {
+static const int KillSigs[] = {
SIGILL, SIGTRAP, SIGABRT, SIGFPE, SIGBUS, SIGSEGV, SIGSYS, SIGXCPU, SIGXFSZ
#ifdef SIGEMT
, SIGEMT
#endif
};
-const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]);
+static const int *KillSigsEnd = KillSigs + sizeof(KillSigs) / sizeof(KillSigs[0]);
#ifdef HAVE_BACKTRACE
-void* StackTrace[256];
+static void* StackTrace[256];
#endif
// PrintStackTrace - In the case of a program crash or fault, print out a stack
@@ -62,7 +62,7 @@ void* StackTrace[256];
//
// On glibc systems we have the 'backtrace' function, which works nicely, but
// doesn't demangle symbols.
-void PrintStackTrace() {
+static void PrintStackTrace() {
#ifdef HAVE_BACKTRACE
// Use backtrace() to output a backtrace on Linux systems with glibc.
int depth = backtrace(StackTrace, array_lengthof(StackTrace));
@@ -71,7 +71,7 @@ void PrintStackTrace() {
}
// SignalHandler - The signal handler that runs...
-RETSIGTYPE SignalHandler(int Sig) {
+static RETSIGTYPE SignalHandler(int Sig) {
if (FilesToRemove != 0)
while (!FilesToRemove->empty()) {
FilesToRemove->back().eraseFromDisk(true);
@@ -103,7 +103,7 @@ RETSIGTYPE SignalHandler(int Sig) {
}
// Just call signal
-void RegisterHandler(int Signal) {
+static void RegisterHandler(int Signal) {
signal(Signal, SignalHandler);
}