1*0fca6ea1SDimitry Andric //===-- nsan_flags.h --------------------------------------------*- C++ -*-===// 2*0fca6ea1SDimitry Andric // 3*0fca6ea1SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*0fca6ea1SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*0fca6ea1SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*0fca6ea1SDimitry Andric // 7*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===// 8*0fca6ea1SDimitry Andric // 9*0fca6ea1SDimitry Andric // This file is a part of NumericalStabilitySanitizer. 10*0fca6ea1SDimitry Andric //===----------------------------------------------------------------------===// 11*0fca6ea1SDimitry Andric 12*0fca6ea1SDimitry Andric #ifndef NSAN_FLAGS_H 13*0fca6ea1SDimitry Andric #define NSAN_FLAGS_H 14*0fca6ea1SDimitry Andric 15*0fca6ea1SDimitry Andric namespace __nsan { 16*0fca6ea1SDimitry Andric 17*0fca6ea1SDimitry Andric struct Flags { 18*0fca6ea1SDimitry Andric #define NSAN_FLAG(Type, Name, DefaultValue, Description) Type Name; 19*0fca6ea1SDimitry Andric #include "nsan_flags.inc" 20*0fca6ea1SDimitry Andric #undef NSAN_FLAG 21*0fca6ea1SDimitry Andric 22*0fca6ea1SDimitry Andric double cached_absolute_error_threshold = 0.0; 23*0fca6ea1SDimitry Andric 24*0fca6ea1SDimitry Andric void SetDefaults(); 25*0fca6ea1SDimitry Andric void PopulateCache(); 26*0fca6ea1SDimitry Andric }; 27*0fca6ea1SDimitry Andric 28*0fca6ea1SDimitry Andric extern Flags flags_data; flags()29*0fca6ea1SDimitry Andricinline Flags &flags() { return flags_data; } 30*0fca6ea1SDimitry Andric 31*0fca6ea1SDimitry Andric void InitializeFlags(); 32*0fca6ea1SDimitry Andric 33*0fca6ea1SDimitry Andric } // namespace __nsan 34*0fca6ea1SDimitry Andric 35*0fca6ea1SDimitry Andric #endif 36