aboutsummaryrefslogtreecommitdiffstats
path: root/lib/System
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-08 19:13:45 +0000
committerChris Lattner <sabre@nondot.org>2009-03-08 19:13:45 +0000
commitafea1b7ea5e0609fd8d90d63d04fb49b0b703cc2 (patch)
tree32b1da3b6b5317c043d63c6b6df35afc1d27299a /lib/System
parentb08d7f0d11d83ab98e8c417cf2cf2374b7534258 (diff)
downloadexternal_llvm-afea1b7ea5e0609fd8d90d63d04fb49b0b703cc2.zip
external_llvm-afea1b7ea5e0609fd8d90d63d04fb49b0b703cc2.tar.gz
external_llvm-afea1b7ea5e0609fd8d90d63d04fb49b0b703cc2.tar.bz2
add some explicit llvm:: qualifiers to the unix side, fix problems on the windows side.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Unix/Signals.inc9
-rw-r--r--lib/System/Win32/Signals.inc4
2 files changed, 7 insertions, 6 deletions
diff --git a/lib/System/Unix/Signals.inc b/lib/System/Unix/Signals.inc
index 94f6b6c..e031e85 100644
--- a/lib/System/Unix/Signals.inc
+++ b/lib/System/Unix/Signals.inc
@@ -101,13 +101,14 @@ static void RegisterHandler(int Signal) {
}
-void sys::SetInterruptFunction(void (*IF)()) {
+void llvm::sys::SetInterruptFunction(void (*IF)()) {
InterruptFunction = IF;
RegisterHandler(SIGINT);
}
// RemoveFileOnSignal - The public API
-bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
+bool llvm::sys::RemoveFileOnSignal(const sys::Path &Filename,
+ std::string* ErrMsg) {
if (FilesToRemove == 0)
FilesToRemove = new std::vector<sys::Path>();
@@ -121,7 +122,7 @@ bool sys::RemoveFileOnSignal(const sys::Path &Filename, std::string* ErrMsg) {
/// AddSignalHandler - Add a function to be called when a signal is delivered
/// to the process. The handler can have a cookie passed to it to identify
/// what instance of the handler it is.
-void sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
+void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
if (CallBacksToRun == 0)
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
@@ -187,7 +188,7 @@ static void PrintStackTrace(void *) {
/// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
-void sys::PrintStackTraceOnErrorSignal() {
+void llvm::sys::PrintStackTraceOnErrorSignal() {
AddSignalHandler(PrintStackTrace, 0);
}
diff --git a/lib/System/Win32/Signals.inc b/lib/System/Win32/Signals.inc
index da9fd50..9276ef4 100644
--- a/lib/System/Win32/Signals.inc
+++ b/lib/System/Win32/Signals.inc
@@ -259,10 +259,10 @@ static BOOL WINAPI LLVMConsoleCtrlHandler(DWORD dwCtrlType) {
/// AddSignalHandler - Add a function to be called when a signal is delivered
/// to the process. The handler can have a cookie passed to it to identify
/// what instance of the handler it is.
-void sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
+void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
if (CallBacksToRun == 0)
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
- std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
+ RegisterHandler();
}