Alexey Samsonov | 6eb53d6 | 2014-07-25 22:24:34 +0000 | [diff] [blame] | 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 | |
Vedant Kumar | 2b1eae0 | 2017-04-14 18:24:35 +0000 | [diff] [blame] | 18 | // Get the full tool name for UBSan. |
| 19 | const char *GetSanititizerToolName(); |
| 20 | |
Alexey Samsonov | 09dce3b | 2015-04-01 22:42:36 +0000 | [diff] [blame] | 21 | // Initialize UBSan as a standalone tool. Typically should be called early |
| 22 | // during initialization. |
| 23 | void InitAsStandalone(); |
| 24 | |
| 25 | // Initialize UBSan as a standalone tool, if it hasn't been initialized before. |
| 26 | void InitAsStandaloneIfNecessary(); |
| 27 | |
| 28 | // Initializes UBSan as a plugin tool. This function should be called once |
| 29 | // from "parent tool" (e.g. ASan) initialization. |
| 30 | void InitAsPlugin(); |
Alexey Samsonov | 6eb53d6 | 2014-07-25 22:24:34 +0000 | [diff] [blame] | 31 | |
| 32 | } // namespace __ubsan |
| 33 | |
| 34 | #endif // UBSAN_INIT_H |