mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 07:30:31 +00:00
Unix/Signals.inc: Let findModulesAndOffsets() built conditionally regarding to (defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)). [-Wunused-function]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219596 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
58c0f65bf2
commit
5adece02b6
@ -272,6 +272,8 @@ void llvm::sys::AddSignalHandler(void (*FnPtr)(void *), void *Cookie) {
|
||||
RegisterHandlers();
|
||||
}
|
||||
|
||||
#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
|
||||
#if HAVE_LINK_H && (defined(__linux__) || defined(__FreeBSD__) || \
|
||||
defined(__FreeBSD_kernel__) || defined(__NetBSD__))
|
||||
struct DlIteratePhdrData {
|
||||
@ -322,7 +324,6 @@ static bool findModulesAndOffsets(void **StackTrace, int Depth,
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
||||
// FIXME: Subtract necessary number from StackTrace entries to turn return addresses
|
||||
// into actual instruction addresses.
|
||||
@ -407,7 +408,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)
|
||||
|
||||
// PrintStackTrace - In the case of a program crash or fault, print out a stack
|
||||
// trace so that the user has an indication of why and where we died.
|
||||
|
Loading…
Reference in New Issue
Block a user