mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
Remove useless and unused CrashRecoveryContext::getBacktrace(). This function always returned an empty string.
llvm-svn: 264458
This commit is contained in:
parent
1ee8ccb61a
commit
22c4f493ca
@ -70,8 +70,7 @@ public:
|
|||||||
/// \return True if the function completed successfully, and false if the
|
/// \return True if the function completed successfully, and false if the
|
||||||
/// function crashed (or HandleCrash was called explicitly). Clients should
|
/// function crashed (or HandleCrash was called explicitly). Clients should
|
||||||
/// make as little assumptions as possible about the program state when
|
/// make as little assumptions as possible about the program state when
|
||||||
/// RunSafely has returned false. Clients can use getBacktrace() to retrieve
|
/// RunSafely has returned false.
|
||||||
/// the backtrace of the crash on failures.
|
|
||||||
bool RunSafely(function_ref<void()> Fn);
|
bool RunSafely(function_ref<void()> Fn);
|
||||||
bool RunSafely(void (*Fn)(void*), void *UserData) {
|
bool RunSafely(void (*Fn)(void*), void *UserData) {
|
||||||
return RunSafely([&]() { Fn(UserData); });
|
return RunSafely([&]() { Fn(UserData); });
|
||||||
@ -94,13 +93,6 @@ public:
|
|||||||
/// \brief Explicitly trigger a crash recovery in the current process, and
|
/// \brief Explicitly trigger a crash recovery in the current process, and
|
||||||
/// return failure from RunSafely(). This function does not return.
|
/// return failure from RunSafely(). This function does not return.
|
||||||
void HandleCrash();
|
void HandleCrash();
|
||||||
|
|
||||||
/// \brief Return a string containing the backtrace where the crash was
|
|
||||||
/// detected; or empty if the backtrace wasn't recovered.
|
|
||||||
///
|
|
||||||
/// This function is only valid when a crash has been detected (i.e.,
|
|
||||||
/// RunSafely() has returned false.
|
|
||||||
const std::string &getBacktrace() const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CrashRecoveryContextCleanup {
|
class CrashRecoveryContextCleanup {
|
||||||
|
@ -31,7 +31,6 @@ struct CrashRecoveryContextImpl {
|
|||||||
const CrashRecoveryContextImpl *Next;
|
const CrashRecoveryContextImpl *Next;
|
||||||
|
|
||||||
CrashRecoveryContext *CRC;
|
CrashRecoveryContext *CRC;
|
||||||
std::string Backtrace;
|
|
||||||
::jmp_buf JumpBuffer;
|
::jmp_buf JumpBuffer;
|
||||||
volatile unsigned Failed : 1;
|
volatile unsigned Failed : 1;
|
||||||
unsigned SwitchedThread : 1;
|
unsigned SwitchedThread : 1;
|
||||||
@ -335,13 +334,6 @@ void CrashRecoveryContext::HandleCrash() {
|
|||||||
CRCI->HandleCrash();
|
CRCI->HandleCrash();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string &CrashRecoveryContext::getBacktrace() const {
|
|
||||||
CrashRecoveryContextImpl *CRC = (CrashRecoveryContextImpl *) Impl;
|
|
||||||
assert(CRC && "Crash recovery context never initialized!");
|
|
||||||
assert(CRC->Failed && "No crash was detected!");
|
|
||||||
return CRC->Backtrace;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: Portability.
|
// FIXME: Portability.
|
||||||
static void setThreadBackgroundPriority() {
|
static void setThreadBackgroundPriority() {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
Loading…
Reference in New Issue
Block a user