[llvm] r264458 - Remove useless and unused CrashRecoveryContext::getBacktrace(). This function always returned an empty string.
Richard Smith via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 25 13:30:10 PDT 2016
Author: rsmith
Date: Fri Mar 25 15:30:10 2016
New Revision: 264458
URL: http://llvm.org/viewvc/llvm-project?rev=264458&view=rev
Log:
Remove useless and unused CrashRecoveryContext::getBacktrace(). This function always returned an empty string.
Modified:
llvm/trunk/include/llvm/Support/CrashRecoveryContext.h
llvm/trunk/lib/Support/CrashRecoveryContext.cpp
Modified: llvm/trunk/include/llvm/Support/CrashRecoveryContext.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CrashRecoveryContext.h?rev=264458&r1=264457&r2=264458&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/CrashRecoveryContext.h (original)
+++ llvm/trunk/include/llvm/Support/CrashRecoveryContext.h Fri Mar 25 15:30:10 2016
@@ -70,8 +70,7 @@ public:
/// \return True if the function completed successfully, and false if the
/// function crashed (or HandleCrash was called explicitly). Clients should
/// make as little assumptions as possible about the program state when
- /// RunSafely has returned false. Clients can use getBacktrace() to retrieve
- /// the backtrace of the crash on failures.
+ /// RunSafely has returned false.
bool RunSafely(function_ref<void()> Fn);
bool RunSafely(void (*Fn)(void*), void *UserData) {
return RunSafely([&]() { Fn(UserData); });
@@ -94,13 +93,6 @@ public:
/// \brief Explicitly trigger a crash recovery in the current process, and
/// return failure from RunSafely(). This function does not return.
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 {
Modified: llvm/trunk/lib/Support/CrashRecoveryContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CrashRecoveryContext.cpp?rev=264458&r1=264457&r2=264458&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CrashRecoveryContext.cpp (original)
+++ llvm/trunk/lib/Support/CrashRecoveryContext.cpp Fri Mar 25 15:30:10 2016
@@ -31,7 +31,6 @@ struct CrashRecoveryContextImpl {
const CrashRecoveryContextImpl *Next;
CrashRecoveryContext *CRC;
- std::string Backtrace;
::jmp_buf JumpBuffer;
volatile unsigned Failed : 1;
unsigned SwitchedThread : 1;
@@ -335,13 +334,6 @@ void CrashRecoveryContext::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.
static void setThreadBackgroundPriority() {
#ifdef __APPLE__
More information about the llvm-commits
mailing list