summaryrefslogtreecommitdiff
path: root/compiler-rt/include
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-09-14 22:19:10 +0000
committerEric Fiselier <eric@efcs.ca>2017-09-14 22:19:10 +0000
commit9bca0c9c9ea6ec603a1b1746c8595381db5bf883 (patch)
tree9da08fc09eb0a5c56bfaaba87826c24677cda9ff /compiler-rt/include
parentab9851db823666f3ba7e06cdec02e8e3b1b503fc (diff)
[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
Diffstat (limited to 'compiler-rt/include')
-rw-r--r--compiler-rt/include/sanitizer/asan_interface.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler-rt/include/sanitizer/asan_interface.h b/compiler-rt/include/sanitizer/asan_interface.h
index e689a730e2c..8828392b649 100644
--- a/compiler-rt/include/sanitizer/asan_interface.h
+++ b/compiler-rt/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