34 lines · c
1//===-- ubsan_init.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// Initialization function for UBSan runtime.10//11//===----------------------------------------------------------------------===//12#ifndef UBSAN_INIT_H13#define UBSAN_INIT_H14 15namespace __ubsan {16 17// Get the full tool name for UBSan.18const char *GetSanititizerToolName();19 20// Initialize UBSan as a standalone tool. Typically should be called early21// during initialization.22void InitAsStandalone();23 24// Initialize UBSan as a standalone tool, if it hasn't been initialized before.25void InitAsStandaloneIfNecessary();26 27// Initializes UBSan as a plugin tool. This function should be called once28// from "parent tool" (e.g. ASan) initialization.29void InitAsPlugin();30 31} // namespace __ubsan32 33#endif // UBSAN_INIT_H34