From 66d44ca6921eaafa08a9ddc886d761e321e78021 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 14 Sep 2017 22:19:10 +0000 Subject: [ASAN] Add macro denoting availability of new `__asan_handle_no_return()` function. Summary: Libc++abi attempts to use the newly added `__asan_handle_no_return()` when built under ASAN. Unfortunately older versions of compiler-rt do not provide this symbol, and so libc++abi needs a way to detect if `asan_interface.h` actually provides the function. This patch adds the macro `SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN` which can be used to detect the availability of the new function. Reviewers: phosek, kcc, vitalybuka, alekseyshl Reviewed By: phosek Subscribers: mclow.lists, cfe-commits Differential Revision: https://reviews.llvm.org/D37871 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@313303 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/sanitizer/asan_interface.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/sanitizer/asan_interface.h b/include/sanitizer/asan_interface.h index e689a730e..8828392b6 100644 --- a/include/sanitizer/asan_interface.h +++ b/include/sanitizer/asan_interface.h @@ -148,6 +148,10 @@ extern "C" { // before things like _exit and execl to avoid false positives on stack. void __asan_handle_no_return(void); + // Required to allow ASAN versions of libc++abi to build against older + // versions of compiler-rt that do not provide this interface. +# define SANITIZER_ASAN_INTERFACE_HAS_HANDLE_NO_RETURN + #ifdef __cplusplus } // extern "C" #endif -- cgit v1.2.3