1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 12:41:49 +01:00

HAVE_UNWIND_BACKTRACE -> HAVE__UNWIND_BACKTRACE

Check for existance and not truth value.

llvm-svn: 282767
This commit is contained in:
Joerg Sonnenberger 2016-09-29 21:07:57 +00:00
parent 62874739b7
commit 5be6ce6f69
3 changed files with 6 additions and 6 deletions

View File

@ -149,7 +149,7 @@ endif()
# function checks
check_symbol_exists(arc4random "stdlib.h" HAVE_DECL_ARC4RANDOM)
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE)
check_symbol_exists(_Unwind_Backtrace "unwind.h" HAVE_UNWIND_BACKTRACE)
check_symbol_exists(_Unwind_Backtrace "unwind.h" HAVE__UNWIND_BACKTRACE)
check_symbol_exists(getpagesize unistd.h HAVE_GETPAGESIZE)
check_symbol_exists(getrusage sys/resource.h HAVE_GETRUSAGE)
check_symbol_exists(setrlimit sys/resource.h HAVE_SETRLIMIT)

View File

@ -340,7 +340,7 @@
#cmakedefine HAVE_UNISTD_H ${HAVE_UNISTD_H}
/* Define to 1 if you have the `_Unwind_Backtrace' function. */
#cmakedefine HAVE_UNWIND_BACKTRACE ${HAVE_UNWIND_BACKTRACE}
#cmakedefine HAVE__UNWIND_BACKTRACE ${HAVE__UNWIND_BACKTRACE}
/* Define to 1 if you have the <utime.h> header file. */
#cmakedefine HAVE_UTIME_H ${HAVE_UTIME_H}

View File

@ -43,7 +43,7 @@
#if HAVE_LINK_H
#include <link.h>
#endif
#if HAVE_UNWIND_BACKTRACE
#ifdef HAVE__UNWIND_BACKTRACE
// FIXME: We should be able to use <unwind.h> for any target that has an
// _Unwind_Backtrace function, but on FreeBSD the configure test passes
// despite the function not existing, and on Android, <unwind.h> conflicts
@ -51,7 +51,7 @@
#ifdef __GLIBC__
#include <unwind.h>
#else
#undef HAVE_UNWIND_BACKTRACE
#undef HAVE__UNWIND_BACKTRACE
#endif
#endif
@ -355,7 +355,7 @@ static bool findModulesAndOffsets(void **StackTrace, int Depth,
}
#endif // defined(HAVE_BACKTRACE) && defined(ENABLE_BACKTRACES) && ...
#if defined(ENABLE_BACKTRACES) && defined(HAVE_UNWIND_BACKTRACE)
#if defined(ENABLE_BACKTRACES) && defined(HAVE__UNWIND_BACKTRACE)
static int unwindBacktrace(void **StackTrace, int MaxEntries) {
if (MaxEntries < 0)
return 0;
@ -401,7 +401,7 @@ void llvm::sys::PrintStackTrace(raw_ostream &OS) {
if (!depth)
depth = backtrace(StackTrace, static_cast<int>(array_lengthof(StackTrace)));
#endif
#if defined(HAVE_UNWIND_BACKTRACE)
#if defined(HAVE__UNWIND_BACKTRACE)
// Try _Unwind_Backtrace() if backtrace() failed.
if (!depth)
depth = unwindBacktrace(StackTrace,