xref: /freebsd/contrib/llvm-project/compiler-rt/lib/nsan/nsan_flags.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1 //===-- nsan_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 NumericalStabilitySanitizer.
10 //===----------------------------------------------------------------------===//
11 
12 #ifndef NSAN_FLAGS_H
13 #define NSAN_FLAGS_H
14 
15 namespace __nsan {
16 
17 struct Flags {
18 #define NSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;
19 #include "nsan_flags.inc"
20 #undef NSAN_FLAG
21 
22   double cached_absolute_error_threshold = 0.0;
23 
24   void SetDefaults();
25   void PopulateCache();
26 };
27 
28 extern Flags flags_data;
flags()29 inline Flags &flags() { return flags_data; }
30 
31 void InitializeFlags();
32 
33 } // namespace __nsan
34 
35 #endif
36