//===-- xray_flags.cpp ------------------------------------------*- C++ -*-===// // // 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 // //===----------------------------------------------------------------------===// // // This file is a part of XRay, a dynamic runtime instrumentation system. // // XRay flag parsing logic. //===----------------------------------------------------------------------===// #include "xray_flags.h" #include "sanitizer_common/sanitizer_common.h" #include "sanitizer_common/sanitizer_flag_parser.h" #include "sanitizer_common/sanitizer_libc.h" #include "xray_defs.h" usingnamespace__sanitizer; namespace __xray { Flags xray_flags_dont_use_directly; // use via flags(). void Flags::setDefaults() XRAY_NEVER_INSTRUMENT { … } void registerXRayFlags(FlagParser *P, Flags *F) XRAY_NEVER_INSTRUMENT { … } // This function, as defined with the help of a macro meant to be introduced at // build time of the XRay runtime, passes in a statically defined list of // options that control XRay. This means users/deployments can tweak the // defaults that override the hard-coded defaults in the xray_flags.inc at // compile-time using the XRAY_DEFAULT_OPTIONS macro. const char *useCompilerDefinedFlags() XRAY_NEVER_INSTRUMENT { … } void initializeFlags() XRAY_NEVER_INSTRUMENT { … } } // namespace __xray