xref: /freebsd/contrib/llvm-project/compiler-rt/lib/xray/xray_flags.h (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1 //===-- xray_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 XRay, a dynamic runtime instrumentation system.
10 //
11 // XRay runtime flags.
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef XRAY_FLAGS_H
15 #define XRAY_FLAGS_H
16 
17 #include "sanitizer_common/sanitizer_flag_parser.h"
18 #include "sanitizer_common/sanitizer_internal_defs.h"
19 
20 namespace __xray {
21 
22 struct Flags {
23 #define XRAY_FLAG(Type, Name, DefaultValue, Description) Type Name;
24 #include "xray_flags.inc"
25 #undef XRAY_FLAG
26 
27   void setDefaults();
28 };
29 
30 extern Flags xray_flags_dont_use_directly;
31 extern void registerXRayFlags(FlagParser *P, Flags *F);
32 const char *useCompilerDefinedFlags();
33 inline Flags *flags() { return &xray_flags_dont_use_directly; }
34 
35 void initializeFlags();
36 
37 } // namespace __xray
38 
39 #endif // XRAY_FLAGS_H
40