From: Chris Lattner Date: Thu, 19 Feb 2004 20:03:14 +0000 (+0000) Subject: Implement new function X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=982774cbebd0280078ee5321ed638a266e79a597;p=oota-llvm.git Implement new function git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11631 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Support/Signals.cpp b/lib/Support/Signals.cpp index 03482f9512c..7adccb1f238 100644 --- a/lib/Support/Signals.cpp +++ b/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); +}