brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c47009b Raw
47 lines · c
1//===-- ubsan_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// Runtime flags for UndefinedBehaviorSanitizer.10//11//===----------------------------------------------------------------------===//12#ifndef UBSAN_FLAGS_H13#define UBSAN_FLAGS_H14 15#include "sanitizer_common/sanitizer_internal_defs.h"16 17namespace __sanitizer {18class FlagParser;19}20 21namespace __ubsan {22 23struct Flags {24#define UBSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;25#include "ubsan_flags.inc"26#undef UBSAN_FLAG27 28  void SetDefaults();29};30 31extern Flags ubsan_flags;32inline Flags *flags() { return &ubsan_flags; }33 34void InitializeFlags();35void RegisterUbsanFlags(FlagParser *parser, Flags *f);36 37}  // namespace __ubsan38 39extern "C" {40// Users may provide their own implementation of __ubsan_default_options to41// override the default flag values.42SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE43const char *__ubsan_default_options();44}  // extern "C"45 46#endif  // UBSAN_FLAGS_H47