blob: f12fc2ced32a61f045365f4b9b79e3f166b46da1 [file] [log] [blame]
Alexey Samsonov6eb53d62014-07-25 22:24:34 +00001//===-- 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
16namespace __ubsan {
17
Vedant Kumar2b1eae02017-04-14 18:24:35 +000018// Get the full tool name for UBSan.
19const char *GetSanititizerToolName();
20
Alexey Samsonov09dce3b2015-04-01 22:42:36 +000021// Initialize UBSan as a standalone tool. Typically should be called early
22// during initialization.
23void InitAsStandalone();
24
25// Initialize UBSan as a standalone tool, if it hasn't been initialized before.
26void InitAsStandaloneIfNecessary();
27
28// Initializes UBSan as a plugin tool. This function should be called once
29// from "parent tool" (e.g. ASan) initialization.
30void InitAsPlugin();
Alexey Samsonov6eb53d62014-07-25 22:24:34 +000031
32} // namespace __ubsan
33
34#endif // UBSAN_INIT_H