Make several symbols static.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49496 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2008-04-10 21:11:47 +00:00
parent eee962e1ce
commit 3bd659ba20
4 changed files with 40 additions and 40 deletions

View File

@@ -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);
}