mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-02 22:32:08 +00:00
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
This commit is contained in:
parent
d694a789cb
commit
f48ba7b74c
@ -101,13 +101,14 @@ static void RegisterHandler(int Signal) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void sys::SetInterruptFunction(void (*IF)()) {
|
void llvm::sys::SetInterruptFunction(void (*IF)()) {
|
||||||
InterruptFunction = IF;
|
InterruptFunction = IF;
|
||||||
RegisterHandler(SIGINT);
|
RegisterHandler(SIGINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoveFileOnSignal - The public API
|
// 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)
|
if (FilesToRemove == 0)
|
||||||
FilesToRemove = new std::vector<sys::Path>();
|
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
|
/// 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
|
/// to the process. The handler can have a cookie passed to it to identify
|
||||||
/// what instance of the handler it is.
|
/// 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)
|
if (CallBacksToRun == 0)
|
||||||
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
|
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
|
||||||
CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
|
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
|
/// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
|
||||||
/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
|
/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
|
||||||
void sys::PrintStackTraceOnErrorSignal() {
|
void llvm::sys::PrintStackTraceOnErrorSignal() {
|
||||||
AddSignalHandler(PrintStackTrace, 0);
|
AddSignalHandler(PrintStackTrace, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -259,10 +259,10 @@ static BOOL WINAPI LLVMConsoleCtrlHandler(DWORD dwCtrlType) {
|
|||||||
/// AddSignalHandler - Add a function to be called when a signal is delivered
|
/// 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
|
/// to the process. The handler can have a cookie passed to it to identify
|
||||||
/// what instance of the handler it is.
|
/// 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)
|
if (CallBacksToRun == 0)
|
||||||
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
|
CallBacksToRun = new std::vector<std::pair<void(*)(void*), void*> >();
|
||||||
CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
|
CallBacksToRun->push_back(std::make_pair(FnPtr, Cookie));
|
||||||
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
|
RegisterHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user