ubsan_init.h 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. //===-- ubsan_init.h --------------------------------------------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // Initialization function for UBSan runtime.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef UBSAN_INIT_H
  13. #define UBSAN_INIT_H
  14. namespace __ubsan {
  15. // Get the full tool name for UBSan.
  16. const char *GetSanititizerToolName();
  17. // Initialize UBSan as a standalone tool. Typically should be called early
  18. // during initialization.
  19. void InitAsStandalone();
  20. // Initialize UBSan as a standalone tool, if it hasn't been initialized before.
  21. void InitAsStandaloneIfNecessary();
  22. // Initializes UBSan as a plugin tool. This function should be called once
  23. // from "parent tool" (e.g. ASan) initialization.
  24. void InitAsPlugin();
  25. } // namespace __ubsan
  26. #endif // UBSAN_INIT_H