//===-- tsan_defs.h ---------------------------------------------*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer (TSan), a race detector. // //===----------------------------------------------------------------------===// #ifndef TSAN_DEFS_H #define TSAN_DEFS_H #include "sanitizer_common/sanitizer_internal_defs.h" #include "sanitizer_common/sanitizer_libc.h" #include "sanitizer_common/sanitizer_mutex.h" #include "ubsan/ubsan_platform.h" #ifndef TSAN_VECTORIZE #define TSAN_VECTORIZE … #endif #if TSAN_VECTORIZE // <emmintrin.h> transitively includes <stdlib.h>, // and it's prohibited to include std headers into tsan runtime. // So we do this dirty trick. #define _MM_MALLOC_H_INCLUDED #define __MM_MALLOC_H # include <emmintrin.h> # include <smmintrin.h> #define VECTOR_ALIGNED … m128; #else #define VECTOR_ALIGNED #endif // Setup defaults for compile definitions. #ifndef TSAN_NO_HISTORY #define TSAN_NO_HISTORY … #endif #ifndef TSAN_CONTAINS_UBSAN # if CAN_SANITIZE_UB && !SANITIZER_GO #define TSAN_CONTAINS_UBSAN … # else #define TSAN_CONTAINS_UBSAN … # endif #endif __tsan // namespace __tsan #endif // TSAN_DEFS_H