[WebAssembly] Add a EM_WEBASSEMBLY value, and several bits of code that use it.
[oota-llvm.git] / include / llvm / Support / Signals.h
index f9b88fc18f4ffac93ae65bdc9c0db74317b59b51..2a4d84bd891a12f8dc1f85cf68e7dc74b4ebff7a 100644 (file)
 #ifndef LLVM_SUPPORT_SIGNALS_H
 #define LLVM_SUPPORT_SIGNALS_H
 
-#include "llvm/Support/Path.h"
-#include <cstdio>
+#include <string>
 
 namespace llvm {
-  class raw_ostream;
+class StringRef;
+class raw_ostream;
 
 namespace sys {
 
@@ -39,7 +39,7 @@ namespace sys {
   /// When an error signal (such as SIBABRT or SIGSEGV) is delivered to the
   /// process, print a stack trace and then exit.
   /// @brief Print a stack trace if a fatal signal occurs.
-  void PrintStackTraceOnErrorSignal();
+  void PrintStackTraceOnErrorSignal(bool DisableCrashReporting = false);
 
   /// Disable all system dialog boxes that appear when the process crashes.
   void DisableSystemDialogsOnCrash();
@@ -47,6 +47,9 @@ namespace sys {
   /// \brief Print the stack trace using the given \c raw_ostream object.
   void PrintStackTrace(raw_ostream &OS);
 
+  // Run all registered signal handlers.
+  void RunSignalHandlers();
+
   /// AddSignalHandler - Add a function to be called when an abort/kill signal
   /// is delivered to the process.  The handler can have a cookie passed to it
   /// to identify what instance of the handler it is.