Home | History | Annotate | Line # | Download | only in ubsan
      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 // Get the full tool name for UBSan.
     19 const char *GetSanititizerToolName();
     20 
     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();
     31 
     32 }  // namespace __ubsan
     33 
     34 #endif  // UBSAN_INIT_H
     35