X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FSupport%2FSignals.h;h=a067b136550a705a93e9b64a640ccb7adf643cd4;hb=8d70064a4ac2ae09b8003173e751cfad9dc15400;hp=58ed175dc22b840c235fac71944f74a086426c17;hpb=b7e2188f7fb9a1c1cb6dbd32b206e44b11b4a157;p=oota-llvm.git diff --git a/include/llvm/Support/Signals.h b/include/llvm/Support/Signals.h index 58ed175dc22..a067b136550 100644 --- a/include/llvm/Support/Signals.h +++ b/include/llvm/Support/Signals.h @@ -15,10 +15,12 @@ #ifndef LLVM_SUPPORT_SIGNALS_H #define LLVM_SUPPORT_SIGNALS_H -#include "llvm/Support/Path.h" -#include +#include namespace llvm { +class StringRef; +class raw_ostream; + namespace sys { /// This function runs all the registered interrupt handlers, including the @@ -28,7 +30,7 @@ namespace sys { /// This function registers signal handlers to ensure that if a signal gets /// delivered that the named file is removed. /// @brief Remove a file if a fatal signal occurs. - bool RemoveFileOnSignal(StringRef Filename, std::string* ErrMsg = 0); + bool RemoveFileOnSignal(StringRef Filename, std::string* ErrMsg = nullptr); /// This function removes a file from the list of files to be removed on /// signal delivery. @@ -39,8 +41,11 @@ namespace sys { /// @brief Print a stack trace if a fatal signal occurs. void PrintStackTraceOnErrorSignal(); - /// \brief Print the stack trace using the given \c FILE object. - void PrintStackTrace(FILE *); + /// Disable all system dialog boxes that appear when the process crashes. + void DisableSystemDialogsOnCrash(); + + /// \brief Print the stack trace using the given \c raw_ostream object. + void PrintStackTrace(raw_ostream &OS); /// 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