summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Unix
diff options
context:
space:
mode:
authorEd Maste <emaste@freebsd.org>2017-04-12 13:51:00 +0000
committerEd Maste <emaste@freebsd.org>2017-04-12 13:51:00 +0000
commite544379b30cc103d5cb8f406516f848a0004ca31 (patch)
treea3ec045b0cae6a05950af59d56af0459bf73e9f6 /llvm/lib/Support/Unix
parent22776892c9aad3cedd2f3692d324ff45af1b29fb (diff)
downloadbcm5719-llvm-e544379b30cc103d5cb8f406516f848a0004ca31.tar.gz
bcm5719-llvm-e544379b30cc103d5cb8f406516f848a0004ca31.zip
Fix detection of backtrace() availability on FreeBSD
On FreeBSD backtrace is not part of libc and depends on libexecinfo being available. Instead of using manual checks we can use the builtin CMake module FindBacktrace.cmake to detect availability of backtrace() in a portable way. Patch By: Alex Richardson Differential Revision: https://reviews.llvm.org/D27143 llvm-svn: 300062
Diffstat (limited to 'llvm/lib/Support/Unix')
-rw-r--r--llvm/lib/Support/Unix/Signals.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/Unix/Signals.inc b/llvm/lib/Support/Unix/Signals.inc
index 756d0f5a95e..88ad21e9806 100644
--- a/llvm/lib/Support/Unix/Signals.inc
+++ b/llvm/lib/Support/Unix/Signals.inc
@@ -25,8 +25,8 @@
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <string>
-#if HAVE_EXECINFO_H
-# include <execinfo.h> // For backtrace().
+#ifdef HAVE_BACKTRACE
+# include BACKTRACE_HEADER // For backtrace().
#endif
#if HAVE_SIGNAL_H
#include <signal.h>
OpenPOWER on IntegriCloud