diff options
author | Walter Lee <waltl@google.com> | 2018-05-18 18:01:08 +0000 |
---|---|---|
committer | Walter Lee <waltl@google.com> | 2018-05-18 18:01:08 +0000 |
commit | 0edca4f5059b817092435ab4d84705981399a07e (patch) | |
tree | 7b1b43708a60cc1d16ea786c5057c8040f4f9e45 | |
parent | 1273f4ad93ba5d6d1488e8a787dc270530cac1fc (diff) | |
download | bcm5719-llvm-0edca4f5059b817092435ab4d84705981399a07e.tar.gz bcm5719-llvm-0edca4f5059b817092435ab4d84705981399a07e.zip |
[asan] Explicitly declare memintrinsics interceptors to have C linkage
This is needed on RTEMS. Also update a comment.
Differential Revision: https://reviews.llvm.org/D47079
llvm-svn: 332746
-rw-r--r-- | compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc b/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc index 6d649317541..39e32cdad12 100644 --- a/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc +++ b/compiler-rt/lib/asan/asan_interceptors_memintrinsics.cc @@ -33,12 +33,12 @@ void *__asan_memmove(void *to, const void *from, uptr size) { #if SANITIZER_FUCHSIA || SANITIZER_RTEMS -// Fuchsia doesn't use sanitizer_common_interceptors.inc, but the only -// things there it wants are these three. Just define them as aliases -// here rather than repeating the contents. +// Fuchsia and RTEMS don't use sanitizer_common_interceptors.inc, but +// the only things there it wants are these three. Just define them +// as aliases here rather than repeating the contents. -decltype(__asan_memcpy) memcpy[[gnu::alias("__asan_memcpy")]]; -decltype(__asan_memmove) memmove[[gnu::alias("__asan_memmove")]]; -decltype(__asan_memset) memset[[gnu::alias("__asan_memset")]]; +extern "C" decltype(__asan_memcpy) memcpy[[gnu::alias("__asan_memcpy")]]; +extern "C" decltype(__asan_memmove) memmove[[gnu::alias("__asan_memmove")]]; +extern "C" decltype(__asan_memset) memset[[gnu::alias("__asan_memset")]]; #endif // SANITIZER_FUCHSIA || SANITIZER_RTEMS |