2003-09-30 18:37:50 +00:00
|
|
|
//===- Support/Signals.h - Signal Handling support --------------*- C++ -*-===//
|
2003-10-20 19:46:57 +00:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
2002-04-18 19:53:34 +00:00
|
|
|
//
|
|
|
|
// This file defines some helpful functions for dealing with the possibility of
|
|
|
|
// unix signals occuring while your program is running.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef SUPPORT_SIGNALS_H
|
|
|
|
#define SUPPORT_SIGNALS_H
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-12-31 04:42:00 +00:00
|
|
|
/// RemoveFileOnSignal - This function registers signal handlers to ensure
|
|
|
|
/// that if a signal gets delivered that the named file is removed.
|
|
|
|
///
|
|
|
|
void RemoveFileOnSignal(const std::string &Filename);
|
2002-04-18 19:53:34 +00:00
|
|
|
|
2004-02-19 20:03:08 +00:00
|
|
|
/// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
|
|
|
|
/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
|
|
|
|
void PrintStackTraceOnErrorSignal();
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|
2002-12-12 03:43:30 +00:00
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
#endif
|