aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/Unix/Signals.inc
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-10-11 01:04:40 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-10-11 01:04:40 +0000
commitbc97a4f46c3679ad1008267a0a1b380d5f26574b (patch)
tree6bbd67ff5734469fabe1259dfe08486231af0f19 /llvm/lib/Support/Unix/Signals.inc
parenta216cad0fcf348b1d03a0a2e3bf6b36d0d880e85 (diff)
downloadllvm-bc97a4f46c3679ad1008267a0a1b380d5f26574b.zip
llvm-bc97a4f46c3679ad1008267a0a1b380d5f26574b.tar.gz
llvm-bc97a4f46c3679ad1008267a0a1b380d5f26574b.tar.bz2
Guard the definition of the stack tracing function with the same macros
that guard its usage. Without this, we can get unused function warnings when backtraces are disabled. llvm-svn: 219558
Diffstat (limited to 'llvm/lib/Support/Unix/Signals.inc')
-rw-r--r--llvm/lib/Support/Unix/Signals.inc2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index a19cc61..39cf662 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -322,6 +322,7 @@ 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.
@@ -406,6 +407,7 @@ static bool printSymbolizedStackTrace(void **StackTrace, int Depth, FILE *FD) {
}
return true;
}
+#endif
// 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.