brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 6f38a62 Raw
49 lines · c
1//===-- asan_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-exception6//7//===----------------------------------------------------------------------===//8//9// This file is a part of AddressSanitizer, an address sanity checker.10//11// ASan runtime flags.12//===----------------------------------------------------------------------===//13 14#ifndef ASAN_FLAGS_H15#define ASAN_FLAGS_H16 17#include "sanitizer_common/sanitizer_internal_defs.h"18#include "sanitizer_common/sanitizer_flag_parser.h"19 20// ASan flag values can be defined in four ways:21// 1) initialized with default values at startup.22// 2) overridden during compilation of ASan runtime by providing23//    compile definition ASAN_DEFAULT_OPTIONS.24// 3) overridden from string returned by user-specified function25//    __asan_default_options().26// 4) overridden from env variable ASAN_OPTIONS.27// 5) overridden during ASan activation (for now used on Android only).28 29namespace __asan {30 31struct Flags {32#define ASAN_FLAG(Type, Name, DefaultValue, Description) Type Name;33#include "asan_flags.inc"34#undef ASAN_FLAG35 36  void SetDefaults();37};38 39extern Flags asan_flags_dont_use_directly;40inline Flags *flags() {41  return &asan_flags_dont_use_directly;42}43 44void InitializeFlags();45 46}  // namespace __asan47 48#endif  // ASAN_FLAGS_H49