| Chris Lattner | 4848689 | 2003-09-30 18:37:50 +0000 | [diff] [blame] | 1 | //===- Support/Signals.h - Signal Handling support --------------*- C++ -*-===// |
| John Criswell | b2109ce | 2003-10-20 19:46:57 +0000 | [diff] [blame] | 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 | //===----------------------------------------------------------------------===// |
| Chris Lattner | 922a392 | 2002-04-18 19:53:34 +0000 | [diff] [blame] | 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 SUPPORT_SIGNALS_H |
| 16 | #define SUPPORT_SIGNALS_H |
| 17 | |
| 18 | #include <string> |
| 19 | |
| Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 20 | namespace llvm { |
| 21 | |
| Chris Lattner | a7e2321 | 2003-12-31 04:42:00 +0000 | [diff] [blame] | 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); |
| Chris Lattner | 922a392 | 2002-04-18 19:53:34 +0000 | [diff] [blame] | 26 | |
| Chris Lattner | 9717ee9 | 2004-02-19 20:03:08 +0000 | [diff] [blame^] | 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(); |
| Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 30 | } // End llvm namespace |
| Chris Lattner | 2a77df3 | 2002-12-12 03:43:30 +0000 | [diff] [blame] | 31 | |
| Brian Gaeke | d0fde30 | 2003-11-11 22:41:34 +0000 | [diff] [blame] | 32 | #endif |