1 //===-- tsan_flags.h --------------------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is a part of ThreadSanitizer (TSan), a race detector.
10 // NOTE: This file may be included into user code.
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef TSAN_FLAGS_H
14 #define TSAN_FLAGS_H
15 
16 #include "sanitizer_common/sanitizer_flags.h"
17 #include "sanitizer_common/sanitizer_deadlock_detector_interface.h"
18 
19 namespace __tsan {
20 
21 struct Flags : DDFlags {
22 #define TSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;
23 #include "tsan_flags.inc"
24 #undef TSAN_FLAG
25 
26   void SetDefaults();
27   void ParseFromString(const char *str);
28 };
29 
30 void InitializeFlags(Flags *flags, const char *env,
31                      const char *env_option_name = nullptr);
32 }  // namespace __tsan
33 
34 #endif  // TSAN_FLAGS_H
35