summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix/Signals.inc
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-10-13 04:32:43 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-10-13 04:32:43 +0000
commit59fe0d4e56858537360526b91b2cfaea2f0e701c (patch)
tree155753d9137eb977fe1194b665711086f16cfc9c /llvm/lib/Support/Unix/Signals.inc
parent75a0240056d5003d52edbef8380e76799510549a (diff)
downloadbcm5719-llvm-59fe0d4e56858537360526b91b2cfaea2f0e701c.tar.gz
bcm5719-llvm-59fe0d4e56858537360526b91b2cfaea2f0e701c.zip
Unix/Signals.inc: Let findModulesAndOffsets() built conditionally regarding to (defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES)). [-Wunused-function]
llvm-svn: 219596
Diffstat (limited to 'llvm/lib/Support/Unix/Signals.inc')
-rw-r--r--llvm/lib/Support/Unix/Signals.inc5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 39cf662c135..d9463b915b9 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -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.
OpenPOWER on IntegriCloud