Moved header from include/Support/ to include/llvm/System
[oota-llvm.git] / include / llvm / System / Signals.h
1 //===- llvm/System/Signals.h - Signal Handling support ----------*- C++ -*-===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines some helpful functions for dealing with the possibility of
11 // unix signals occuring while your program is running.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_SYSTEM_SIGNALS_H
16 #define LLVM_SYSTEM_SIGNALS_H
17
18 #include <string>
19
20 namespace llvm {
21
22   /// RemoveFileOnSignal - This function registers signal handlers to ensure
23   /// that if a signal gets delivered that the named file is removed.
24   ///
25   void RemoveFileOnSignal(const std::string &Filename);
26
27   /// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
28   /// SIGSEGV) is delivered to the process, print a stack trace and then exit.
29   void PrintStackTraceOnErrorSignal();
30 } // End llvm namespace
31
32 #endif