summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Signals.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-19 20:03:14 +0000
committerChris Lattner <sabre@nondot.org>2004-02-19 20:03:14 +0000
commitb0bedfa4b2383667dbd63a2796800ae6884bb94e (patch)
tree1d4890f8a824c30f5d01678645e36c2aefe2c0b8 /llvm/lib/Support/Signals.cpp
parentc62ce162ffdc9a33efaf1d7b263ff47ad5e3393a (diff)
downloadbcm5719-llvm-b0bedfa4b2383667dbd63a2796800ae6884bb94e.tar.gz
bcm5719-llvm-b0bedfa4b2383667dbd63a2796800ae6884bb94e.zip
Implement new function
llvm-svn: 11631
Diffstat (limited to 'llvm/lib/Support/Signals.cpp')
-rw-r--r--llvm/lib/Support/Signals.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Support/Signals.cpp b/llvm/lib/Support/Signals.cpp
index 03482f9512c..7adccb1f238 100644
--- a/llvm/lib/Support/Signals.cpp
+++ b/llvm/lib/Support/Signals.cpp
@@ -69,3 +69,9 @@ void llvm::RemoveFileOnSignal(const std::string &Filename) {
std::for_each(IntSigs, IntSigsEnd, RegisterHandler);
std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
}
+
+/// PrintStackTraceOnErrorSignal - When an error signal (such as SIBABRT or
+/// SIGSEGV) is delivered to the process, print a stack trace and then exit.
+void llvm::PrintStackTraceOnErrorSignal() {
+ std::for_each(KillSigs, KillSigsEnd, RegisterHandler);
+}
OpenPOWER on IntegriCloud