Skip building unused parts when targeting SJLJ
When SJLJ exceptions are used, those functions aren't used.
This fixes build failures on ARM with SJLJ enabled (e.g. on armv7/iOS)
when built using the CMake project files.
Differential Revision: https://reviews.llvm.org/D38249
llvm-svn: 314197
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: b51c49aa5202823f459d52adb9c20131928712a8
diff --git a/src/libunwind.cpp b/src/libunwind.cpp
index f072d55..e9981f4 100644
--- a/src/libunwind.cpp
+++ b/src/libunwind.cpp
@@ -24,6 +24,7 @@
#include <stdlib.h>
+#if !defined(__USING_SJLJ_EXCEPTIONS__)
#include "AddressSpace.hpp"
#include "UnwindCursor.hpp"
@@ -341,6 +342,7 @@
DwarfFDECache<LocalAddressSpace>::removeAllIn((LocalAddressSpace::pint_t)fde);
}
#endif // defined(_LIBUNWIND_SUPPORT_DWARF_UNWIND)
+#endif // !defined(__USING_SJLJ_EXCEPTIONS__)