diff options
Diffstat (limited to 'lib/Support/Unix/Signals.inc')
-rw-r--r-- | lib/Support/Unix/Signals.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Support/Unix/Signals.inc b/lib/Support/Unix/Signals.inc index 66338f1..1f8c815 100644 --- a/lib/Support/Unix/Signals.inc +++ b/lib/Support/Unix/Signals.inc @@ -27,9 +27,11 @@ #if HAVE_SYS_STAT_H #include <sys/stat.h> #endif -#if HAVE_DLFCN_H && __GNUG__ +#if HAVE_CXXABI_H +#include cxxabi.h> +#endif +#if HAVE_DLFCN_H #include <dlfcn.h> -#include <cxxabi.h> #endif #if HAVE_MACH_MACH_H #include <mach/mach.h> @@ -292,7 +294,11 @@ void llvm::sys::PrintStackTrace(FILE *FD) { if (dlinfo.dli_sname != NULL) { int res; fputc(' ', FD); +# if HAVE_CXXABI_H char* d = abi::__cxa_demangle(dlinfo.dli_sname, NULL, NULL, &res); +# else + char* d = NULL; +# endif if (d == NULL) fputs(dlinfo.dli_sname, FD); else fputs(d, FD); free(d); |