xref: /freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/flags.h (revision 0bf56da32d83fbd3b5db8d6c72cd1e7cc26fbc66)
1 //===-- 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 #ifndef SCUDO_FLAGS_H_
10 #define SCUDO_FLAGS_H_
11 
12 #include "internal_defs.h"
13 
14 namespace scudo {
15 
16 struct Flags {
17 #define SCUDO_FLAG(Type, Name, DefaultValue, Description) Type Name;
18 #include "flags.inc"
19 #undef SCUDO_FLAG
20 
21 #ifdef GWP_ASAN_HOOKS
22 #define GWP_ASAN_OPTION(Type, Name, DefaultValue, Description)                 \
23   Type GWP_ASAN_##Name;
24 #include "gwp_asan/options.inc"
25 #undef GWP_ASAN_OPTION
26 #endif // GWP_ASAN_HOOKS
27 
28   void setDefaults();
29 };
30 
31 Flags *getFlags();
32 void initFlags();
33 class FlagParser;
34 void registerFlags(FlagParser *Parser, Flags *F);
35 
36 } // namespace scudo
37 
38 #endif // SCUDO_FLAGS_H_
39