From c9a7e37ba2b696c85235d36ff269ec7de24b882c Mon Sep 17 00:00:00 2001 From: Kuba Brecka Date: Thu, 2 Jul 2015 13:56:37 +0000 Subject: [sanitizer] add #ifdefs around slow unwinder to fix OS X debug build A recent change in slow unwinder causes the OS X build to fail when using COMPILER_RT_DEBUG=On. Let's fix this by #ifdef'ing it with #if SANITIZER_CAN_SLOW_UNWIND. See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20150622/284294.html Reviewed at http://reviews.llvm.org/D10870 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@241261 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc') diff --git a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc index b55d4dde0..f66fa79f1 100644 --- a/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc @@ -60,10 +60,14 @@ void BufferedStackTrace::Unwind(u32 max_depth, uptr pc, uptr bp, void *context, return; } if (!WillUseFastUnwind(request_fast_unwind)) { +#if SANITIZER_CAN_SLOW_UNWIND if (context) SlowUnwindStackWithContext(pc, context, max_depth); else SlowUnwindStack(pc, max_depth); +#else + UNREACHABLE("slow unwind requested but not available"); +#endif } else { FastUnwindStack(pc, bp, stack_top, stack_bottom, max_depth); } -- cgit v1.2.3