ubsan_init.h revision 1.3
1//===-- ubsan_init.h --------------------------------------------*- C++ -*-===//
2//
3// This file is distributed under the University of Illinois Open Source
4// License. See LICENSE.TXT for details.
5//
6//===----------------------------------------------------------------------===//
7//
8// Initialization function for UBSan runtime.
9//
10//===----------------------------------------------------------------------===//
11#ifndef UBSAN_INIT_H
12#define UBSAN_INIT_H
13
14namespace __ubsan {
15
16// Initialize UBSan as a standalone tool. Typically should be called early
17// during initialization.
18void InitAsStandalone();
19
20// Initialize UBSan as a standalone tool, if it hasn't been initialized before.
21void InitAsStandaloneIfNecessary();
22
23// Initializes UBSan as a plugin tool. This function should be called once
24// from "parent tool" (e.g. ASan) initialization.
25void InitAsPlugin();
26
27}  // namespace __ubsan
28
29#endif  // UBSAN_INIT_H
30