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