Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-09-15 01:37:34 +0300
committerEric Fiselier <eric@efcs.ca>2017-09-15 01:37:34 +0300
commitc4600ccf891ca8290ee4fa0a3f2be235dd5963d0 (patch)
tree0928ec8a359b6cdaf969b060007135bd27f65b03 /libcxxabi/src/cxa_exception.cpp
parent49581583e22724a06fac06c9e4794fcb22cf2272 (diff)
Fix ASAN build with older compiler-rt versions.
compiler-rt recently added the __asan_handle_no_return() function that libc++abi needs to use, however older versions of compiler-rt don't declare this interface publicly and that breaks the libc++abi build. This patch attempts to fix the issues by declaring the asan function explicitly, so we don't depend on compiler-rt to provide the declaration. llvm-svn: 313308
Diffstat (limited to 'libcxxabi/src/cxa_exception.cpp')
-rw-r--r--libcxxabi/src/cxa_exception.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 4662ccddf1de..e6ed0931cebf 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -20,7 +20,7 @@
#include "fallback_malloc.h"
#if __has_feature(address_sanitizer)
-#include <sanitizer/asan_interface.h>
+extern "C" void __asan_handle_no_return(void);
#endif
// +---------------------------+-----------------------------+---------------+
@@ -222,8 +222,7 @@ __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) && \
- defined(SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN)
+#if __has_feature(address_sanitizer)
// Inform the ASan runtime that now might be a good time to clean stuff up.
__asan_handle_no_return();
#endif