Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / lib / memprof / memprof_flags.h
blob2f2b628653dc19c1bb426ad4ba4c01a63e1f31d0
1 //===-- memprof_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 MemProfiler, a memory profiler.
11 // MemProf runtime flags.
12 //===----------------------------------------------------------------------===//
14 #ifndef MEMPROF_FLAGS_H
15 #define MEMPROF_FLAGS_H
17 #include "sanitizer_common/sanitizer_flag_parser.h"
18 #include "sanitizer_common/sanitizer_internal_defs.h"
20 // MemProf flag values can be defined in four ways:
21 // 1) initialized with default values at startup.
22 // 2) overriden during compilation of MemProf runtime by providing
23 // compile definition MEMPROF_DEFAULT_OPTIONS.
24 // 3) overriden from string returned by user-specified function
25 // __memprof_default_options().
26 // 4) overriden from env variable MEMPROF_OPTIONS.
28 namespace __memprof {
30 struct Flags {
31 #define MEMPROF_FLAG(Type, Name, DefaultValue, Description) Type Name;
32 #include "memprof_flags.inc"
33 #undef MEMPROF_FLAG
35 void SetDefaults();
38 extern Flags memprof_flags_dont_use_directly;
39 inline Flags *flags() { return &memprof_flags_dont_use_directly; }
41 void InitializeFlags();
43 } // namespace __memprof
45 #endif // MEMPROF_FLAGS_H