#ifndef SANITIZER_DEFS_H
#define SANITIZER_DEFS_H
#include "sanitizer_platform.h"
#include "sanitizer_redefine_builtins.h"
#if !defined(__has_feature)
#define __has_feature …
#endif
#ifndef SANITIZER_DEBUG
#define SANITIZER_DEBUG …
#endif
#define SANITIZER_STRINGIFY_(S) …
#define SANITIZER_STRINGIFY(S) …
#if SANITIZER_WINDOWS
#if SANITIZER_IMPORT_INTERFACE
#define SANITIZER_INTERFACE_ATTRIBUTE …
#else
#define SANITIZER_INTERFACE_ATTRIBUTE …
#endif
#define SANITIZER_WEAK_ATTRIBUTE
#define SANITIZER_WEAK_IMPORT
#elif SANITIZER_GO
#define SANITIZER_INTERFACE_ATTRIBUTE
#define SANITIZER_WEAK_ATTRIBUTE
#define SANITIZER_WEAK_IMPORT
#else
#define SANITIZER_INTERFACE_ATTRIBUTE …
#define SANITIZER_WEAK_ATTRIBUTE …
# if SANITIZER_APPLE
#define SANITIZER_WEAK_IMPORT …
# else
#define SANITIZER_WEAK_IMPORT …
# endif
#endif
#if SANITIZER_WINDOWS
#include "sanitizer_win_defs.h"
#define SANITIZER_INTERFACE_WEAK_DEF …
#else
#define SANITIZER_INTERFACE_WEAK_DEF(ReturnType, Name, ...) …
#endif
#ifndef SANITIZER_SUPPORTS_WEAK_HOOKS
#if (SANITIZER_LINUX || SANITIZER_SOLARIS) && !SANITIZER_GO
#define SANITIZER_SUPPORTS_WEAK_HOOKS …
#elif SANITIZER_APPLE && \
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1090 && !SANITIZER_GO
#define SANITIZER_SUPPORTS_WEAK_HOOKS …
#else
#define SANITIZER_SUPPORTS_WEAK_HOOKS …
#endif
#endif
#ifndef SANITIZER_CAN_USE_PREINIT_ARRAY
#if (SANITIZER_LINUX || SANITIZER_FUCHSIA || SANITIZER_NETBSD) && !defined(PIC)
#define SANITIZER_CAN_USE_PREINIT_ARRAY …
#elif SANITIZER_SOLARIS && !defined(PIC)
#define SANITIZER_CAN_USE_PREINIT_ARRAY …
#else
#define SANITIZER_CAN_USE_PREINIT_ARRAY …
#endif
#endif
#if !defined(__has_feature)
#define __has_feature …
#endif
#if !defined(__has_attribute)
#define __has_attribute …
#endif
#if !defined(__has_cpp_attribute)
#define __has_cpp_attribute …
#endif
namespace __sanitizer {
#if defined(_WIN64)
typedef unsigned long long uptr;
typedef signed long long sptr;
#else
# if (SANITIZER_WORDSIZE == 64) || SANITIZER_APPLE
uptr;
sptr;
# else
typedef unsigned int uptr;
typedef signed int sptr;
# endif
#endif
#if defined(__x86_64__)
uhwptr;
#else
typedef uptr uhwptr;
#endif
u8;
u16;
u32;
u64;
s8;
s16;
s32;
s64;
#if SANITIZER_WINDOWS
typedef void* fd_t;
typedef unsigned error_t;
#else
fd_t;
error_t;
#endif
#if SANITIZER_SOLARIS && !defined(_LP64)
typedef long pid_t;
#else
pid_t;
#endif
#if SANITIZER_FREEBSD || SANITIZER_NETBSD || SANITIZER_APPLE || \
(SANITIZER_SOLARIS && (defined(_LP64) || _FILE_OFFSET_BITS == 64)) || \
(SANITIZER_LINUX && !SANITIZER_GLIBC && !SANITIZER_ANDROID) || \
(SANITIZER_LINUX && (defined(__x86_64__) || defined(__hexagon__)))
OFF_T;
#else
typedef uptr OFF_T;
#endif
OFF64_T;
#ifdef __SIZE_TYPE__
usize;
#else
typedef uptr usize;
#endif
tid_t;
#define INTERFACE_ATTRIBUTE …
#define SANITIZER_WEAK_DEFAULT_IMPL …
#define SANITIZER_WEAK_CXX_DEFAULT_IMPL …
#if defined(_MSC_VER)
#define ALWAYS_INLINE …
#define ALIAS …
#define ALIGNED …
#define FORMAT …
#define NOINLINE …
#define NORETURN …
#define THREADLOCAL …
#define LIKELY …
#define UNLIKELY …
#define PREFETCH …
#define WARN_UNUSED_RESULT
#else
#define ALWAYS_INLINE …
#define ALIAS(x) …
#define ALIGNED(x) …
#define FORMAT(f, a) …
#define NOINLINE …
#define NORETURN …
#define THREADLOCAL …
#define LIKELY(x) …
#define UNLIKELY(x) …
# if defined(__i386__) || defined(__x86_64__)
#define PREFETCH(x) …
# else
#define PREFETCH …
# endif
#define WARN_UNUSED_RESULT …
#endif
#if !defined(_MSC_VER) || defined(__clang__)
#define UNUSED …
#define USED …
#else
#define UNUSED
#define USED
#endif
#if !defined(_MSC_VER) || defined(__clang__) || MSC_PREREQ(1900)
#define NOEXCEPT …
#else
#define NOEXCEPT …
#endif
#if __has_cpp_attribute(clang::fallthrough)
#define FALLTHROUGH …
#elif __has_cpp_attribute(fallthrough)
#define FALLTHROUGH …
#else
#define FALLTHROUGH
#endif
#if __has_attribute(uninitialized)
#define UNINITIALIZED …
#else
#define UNINITIALIZED
#endif
uu16;
uu32;
uu64;
us16;
us32;
us64;
#if SANITIZER_WINDOWS
}
typedef unsigned long DWORD;
namespace __sanitizer {
typedef DWORD thread_return_t;
#define THREAD_CALLING_CONV …
#else
thread_return_t;
#define THREAD_CALLING_CONV
#endif
thread_callback_t;
void NORETURN Die();
void NORETURN CheckFailed(const char *file, int line, const char *cond,
u64 v1, u64 v2);
#define RAW_CHECK_MSG(expr, msg, ...) …
#define RAW_CHECK(expr) …
#define RAW_CHECK_VA(expr, ...) …
#define CHECK_IMPL(c1, op, c2) …
#define CHECK(a) …
#define CHECK_EQ(a, b) …
#define CHECK_NE(a, b) …
#define CHECK_LT(a, b) …
#define CHECK_LE(a, b) …
#define CHECK_GT(a, b) …
#define CHECK_GE(a, b) …
#if SANITIZER_DEBUG
#define DCHECK …
#define DCHECK_EQ …
#define DCHECK_NE …
#define DCHECK_LT …
#define DCHECK_LE …
#define DCHECK_GT …
#define DCHECK_GE …
#else
#define DCHECK(a) …
#define DCHECK_EQ(a, b) …
#define DCHECK_NE(a, b) …
#define DCHECK_LT(a, b) …
#define DCHECK_LE(a, b) …
#define DCHECK_GT(a, b) …
#define DCHECK_GE(a, b) …
#endif
#define UNREACHABLE(msg) …
#define UNIMPLEMENTED() …
#define COMPILER_CHECK(pred) …
#define ARRAY_SIZE(a) …
#undef __INT64_C
#undef __UINT64_C
#if SANITIZER_WORDSIZE == 64
#define __INT64_C(c) …
#define __UINT64_C(c) …
#else
#define __INT64_C …
#define __UINT64_C …
#endif
#undef INT32_MIN
#define INT32_MIN …
#undef INT32_MAX
#define INT32_MAX …
#undef UINT32_MAX
#define UINT32_MAX …
#undef INT64_MIN
#define INT64_MIN …
#undef INT64_MAX
#define INT64_MAX …
#undef UINT64_MAX
#define UINT64_MAX …
#undef UINTPTR_MAX
#if SANITIZER_WORDSIZE == 64
#define UINTPTR_MAX …
#else
#define UINTPTR_MAX …
#endif
enum LinkerInitialized { … };
#if !defined(_MSC_VER) || defined(__clang__)
#define GET_CALLER_PC() …
#define GET_CURRENT_FRAME() …
inline void Trap() { … }
#else
extern "C" void* _ReturnAddress(void);
extern "C" void* _AddressOfReturnAddress(void);
# pragma intrinsic(_ReturnAddress)
# pragma intrinsic(_AddressOfReturnAddress)
#define GET_CALLER_PC …
#define GET_CURRENT_FRAME …
extern "C" void __ud2(void);
# pragma intrinsic(__ud2)
inline void Trap() {
__ud2();
}
#endif
#define HANDLE_EINTR(res, f) …
#define ENABLE_FRAME_POINTER …
Tid;
constexpr Tid kInvalidTid = …;
constexpr Tid kMainTid = …;
StackID;
const StackID kInvalidStackID = …;
}
namespace __asan {
usingnamespace__sanitizer;
}
namespace __dsan {
usingnamespace__sanitizer;
}
namespace __dfsan {
usingnamespace__sanitizer;
}
namespace __lsan {
usingnamespace__sanitizer;
}
namespace __msan {
usingnamespace__sanitizer;
}
namespace __nsan {
usingnamespace__sanitizer;
}
namespace __hwasan {
usingnamespace__sanitizer;
}
namespace __tsan {
usingnamespace__sanitizer;
}
namespace __scudo {
usingnamespace__sanitizer;
}
namespace __ubsan {
usingnamespace__sanitizer;
}
namespace __xray {
usingnamespace__sanitizer;
}
namespace __interception {
usingnamespace__sanitizer;
}
namespace __hwasan {
usingnamespace__sanitizer;
}
namespace __memprof {
usingnamespace__sanitizer;
}
#endif