blob: 211cf111be26445bda9564376fa9194c5765f08f [file] [log] [blame]
Chris Lattner48486892003-09-30 18:37:50 +00001//===- Support/Signals.h - Signal Handling support --------------*- C++ -*-===//
John Criswellb2109ce2003-10-20 19:46:57 +00002//
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 Lattner922a3922002-04-18 19:53:34 +00009//
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 Gaeked0fde302003-11-11 22:41:34 +000020namespace llvm {
21
Chris Lattnera7e23212003-12-31 04:42:00 +000022 /// 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 Lattner922a3922002-04-18 19:53:34 +000026
Chris Lattner9717ee92004-02-19 20:03:08 +000027 /// 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 Gaeked0fde302003-11-11 22:41:34 +000030} // End llvm namespace
Chris Lattner2a77df32002-12-12 03:43:30 +000031
Brian Gaeked0fde302003-11-11 22:41:34 +000032#endif