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 03482f9..7adccb1 100644
--- a/lib/Support/Signals.cpp
+++ b/lib/Support/Signals.cpp
@@ -69,3 +69,9 @@
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);
+}