Path: blob/main/contrib/llvm-project/compiler-rt/lib/ubsan/ubsan_flags.h
35233 views
//===-- ubsan_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// Runtime flags for UndefinedBehaviorSanitizer.9//10//===----------------------------------------------------------------------===//11#ifndef UBSAN_FLAGS_H12#define UBSAN_FLAGS_H1314#include "sanitizer_common/sanitizer_internal_defs.h"1516namespace __sanitizer {17class FlagParser;18}1920namespace __ubsan {2122struct Flags {23#define UBSAN_FLAG(Type, Name, DefaultValue, Description) Type Name;24#include "ubsan_flags.inc"25#undef UBSAN_FLAG2627void SetDefaults();28};2930extern Flags ubsan_flags;31inline Flags *flags() { return &ubsan_flags; }3233void InitializeFlags();34void RegisterUbsanFlags(FlagParser *parser, Flags *f);3536} // namespace __ubsan3738extern "C" {39// Users may provide their own implementation of __ubsan_default_options to40// override the default flag values.41SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE42const char *__ubsan_default_options();43} // extern "C"4445#endif // UBSAN_FLAGS_H464748