Path: blob/main/contrib/llvm-project/compiler-rt/lib/asan/asan_flags.h
35233 views
//===-- asan_flags.h -------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file is a part of AddressSanitizer, an address sanity checker.9//10// ASan runtime flags.11//===----------------------------------------------------------------------===//1213#ifndef ASAN_FLAGS_H14#define ASAN_FLAGS_H1516#include "sanitizer_common/sanitizer_internal_defs.h"17#include "sanitizer_common/sanitizer_flag_parser.h"1819// ASan flag values can be defined in four ways:20// 1) initialized with default values at startup.21// 2) overriden during compilation of ASan runtime by providing22// compile definition ASAN_DEFAULT_OPTIONS.23// 3) overriden from string returned by user-specified function24// __asan_default_options().25// 4) overriden from env variable ASAN_OPTIONS.26// 5) overriden during ASan activation (for now used on Android only).2728namespace __asan {2930struct Flags {31#define ASAN_FLAG(Type, Name, DefaultValue, Description) Type Name;32#include "asan_flags.inc"33#undef ASAN_FLAG3435void SetDefaults();36};3738extern Flags asan_flags_dont_use_directly;39inline Flags *flags() {40return &asan_flags_dont_use_directly;41}4243void InitializeFlags();4445} // namespace __asan4647#endif // ASAN_FLAGS_H484950