[PR67828] don't unswitch on default defs of non-parms
[official-gcc.git] / libsanitizer / ubsan / ubsan_flags.h
blob00be9b004f43117594f5f74cb04ff08b476b0cf6
1 //===-- ubsan_flags.h -------------------------------------------*- C++ -*-===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // Runtime flags for UndefinedBehaviorSanitizer.
9 //
10 //===----------------------------------------------------------------------===//
11 #ifndef UBSAN_FLAGS_H
12 #define UBSAN_FLAGS_H
14 #include "sanitizer_common/sanitizer_internal_defs.h"
16 namespace __ubsan {
18 struct Flags {
19 bool halt_on_error;
20 bool print_stacktrace;
23 extern Flags ubsan_flags;
24 inline Flags *flags() { return &ubsan_flags; }
26 void InitializeCommonFlags();
27 void InitializeFlags();
29 } // namespace __ubsan
31 extern "C" {
32 // Users may provide their own implementation of __ubsan_default_options to
33 // override the default flag values.
34 SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
35 const char *__ubsan_default_options();
36 } // extern "C"
38 #endif // UBSAN_FLAGS_H