summaryrefslogtreecommitdiff
path: root/include/llvm/Support/PrettyStackTrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/PrettyStackTrace.h')
-rw-r--r--include/llvm/Support/PrettyStackTrace.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Support/PrettyStackTrace.h b/include/llvm/Support/PrettyStackTrace.h
index 96afb60d8e51..027f9433969d 100644
--- a/include/llvm/Support/PrettyStackTrace.h
+++ b/include/llvm/Support/PrettyStackTrace.h
@@ -66,6 +66,18 @@ namespace llvm {
void print(raw_ostream &OS) const override;
};
+ /// Returns the topmost element of the "pretty" stack state.
+ const void* SavePrettyStackState();
+
+ /// Restores the topmost element of the "pretty" stack state to State, which
+ /// should come from a previous call to SavePrettyStackState(). This is
+ /// useful when using a CrashRecoveryContext in code that also uses
+ /// PrettyStackTraceEntries, to make sure the stack that's printed if a crash
+ /// happens after a crash that's been recovered by CrashRecoveryContext
+ /// doesn't have frames on it that were added in code unwound by the
+ /// CrashRecoveryContext.
+ void RestorePrettyStackState(const void* State);
+
} // end namespace llvm
#endif