2016-07-21 15:39:55 +08:00
|
|
|
//===-- xray_flags.h -------------------------------------------*- C++ -*-===//
|
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2016-07-21 15:39:55 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
2021-09-04 15:31:34 +08:00
|
|
|
// This file is a part of XRay, a dynamic runtime instrumentation system.
|
2016-07-21 15:39:55 +08:00
|
|
|
//
|
|
|
|
// XRay runtime flags.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef XRAY_FLAGS_H
|
|
|
|
#define XRAY_FLAGS_H
|
|
|
|
|
|
|
|
#include "sanitizer_common/sanitizer_flag_parser.h"
|
2017-12-14 10:51:20 +08:00
|
|
|
#include "sanitizer_common/sanitizer_internal_defs.h"
|
2016-07-21 15:39:55 +08:00
|
|
|
|
|
|
|
namespace __xray {
|
|
|
|
|
|
|
|
struct Flags {
|
|
|
|
#define XRAY_FLAG(Type, Name, DefaultValue, Description) Type Name;
|
|
|
|
#include "xray_flags.inc"
|
|
|
|
#undef XRAY_FLAG
|
|
|
|
|
2017-02-08 07:35:34 +08:00
|
|
|
void setDefaults();
|
2016-07-21 15:39:55 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern Flags xray_flags_dont_use_directly;
|
2018-05-04 14:13:35 +08:00
|
|
|
extern void registerXRayFlags(FlagParser *P, Flags *F);
|
|
|
|
const char *useCompilerDefinedFlags();
|
2016-07-21 15:39:55 +08:00
|
|
|
inline Flags *flags() { return &xray_flags_dont_use_directly; }
|
|
|
|
|
2017-02-08 07:35:34 +08:00
|
|
|
void initializeFlags();
|
2016-07-21 15:39:55 +08:00
|
|
|
|
|
|
|
} // namespace __xray
|
|
|
|
|
|
|
|
#endif // XRAY_FLAGS_H
|