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