summaryrefslogtreecommitdiffstats
path: root/libcxxabi/src
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-09-14 22:19:28 +0000
committerEric Fiselier <eric@efcs.ca>2017-09-14 22:19:28 +0000
commit8635f7d2c64cf34014c2acc6f910692942c42fa6 (patch)
tree1d794018fc1fb77901d6b97e39c692bf89d4e480 /libcxxabi/src
parent6892062f7c1df89ae130c07662d50a90ddb82ea2 (diff)
downloadbcm5719-llvm-8635f7d2c64cf34014c2acc6f910692942c42fa6.tar.gz
bcm5719-llvm-8635f7d2c64cf34014c2acc6f910692942c42fa6.zip
[libc++abi] Fix ASAN build with older compiler-rt versions.
Summary: compiler-rt recently added the `__asan_handle_no_return()` function that libc++abi needs to use, however older versions of compiler-rt don't provide this interface and that breaks the libc++abi build. This patch attempts to fix the issues by using a macro to detect if `asan_interface.h` is new enough to provide the function. See D37871 Reviewers: phosek, vitalybuka Reviewed By: phosek, vitalybuka Subscribers: dberris, cfe-commits Differential Revision: https://reviews.llvm.org/D37872 llvm-svn: 313304
Diffstat (limited to 'libcxxabi/src')
-rw-r--r--libcxxabi/src/cxa_exception.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 204ea2ded00..4662ccddf1d 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -222,7 +222,8 @@ __cxa_throw(void *thrown_object, std::type_info *tinfo, void (*dest)(void *)) {
exception_header->unwindHeader.exception_cleanup = exception_cleanup_func;
-#if __has_feature(address_sanitizer)
+#if __has_feature(address_sanitizer) && \
+ defined(SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN)
// Inform the ASan runtime that now might be a good time to clean stuff up.
__asan_handle_no_return();
#endif
OpenPOWER on IntegriCloud