guard include with has_feature

clang's sanitizer/msan_interface.h has fallback macros.
It causes redefinition of __msan_unpoison().
This commit is contained in:
NARUSE, Yui 2019-05-01 01:06:13 +09:00
parent 3de03544ff
commit fc3e80cf6d

View File

@ -112,8 +112,10 @@ extern "C" {
#endif
#ifdef HAVE_SANITIZER_MSAN_INTERFACE_H
# if __has_feature(memory_sanitizer)
# include <sanitizer/msan_interface.h>
# endif
#endif
#if !__has_feature(memory_sanitizer)
# define __msan_allocated_memory(x, y)