[clang] Handle __declspec() attributes in using
[llvm-project.git] / compiler-rt / lib / ubsan / ubsan_init.h
blob0510385b13dd2562436571e6cfd4a528363e6a92
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Initialization function for UBSan runtime.
11 //===----------------------------------------------------------------------===//
12 #ifndef UBSAN_INIT_H
13 #define UBSAN_INIT_H
15 namespace __ubsan {
17 // Get the full tool name for UBSan.
18 const char *GetSanititizerToolName();
20 // Initialize UBSan as a standalone tool. Typically should be called early
21 // during initialization.
22 void InitAsStandalone();
24 // Initialize UBSan as a standalone tool, if it hasn't been initialized before.
25 void InitAsStandaloneIfNecessary();
27 // Initializes UBSan as a plugin tool. This function should be called once
28 // from "parent tool" (e.g. ASan) initialization.
29 void InitAsPlugin();
31 } // namespace __ubsan
33 #endif // UBSAN_INIT_H